xref: /titanic_51/usr/src/lib/libproc/Makefile.com (revision 2d4be7aab5a43b4b2bf4e1b527dcddb9bff39ee6)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24
25LIBRARY = libproc.a
26VERS = .1
27
28CMNOBJS =	\
29	P32ton.o	\
30	Pcontrol.o	\
31	Pcore.o		\
32	Pexecname.o	\
33	Pgcore.o	\
34	Pidle.o		\
35	Pisprocdir.o	\
36	Plwpregs.o	\
37	Pservice.o	\
38	Psymtab.o	\
39	Psymtab_machelf32.o \
40	$(CMNOBJS64)	\
41	Pscantext.o	\
42	Pstack.o	\
43	Psyscall.o	\
44	Putil.o		\
45	Pzone.o		\
46	pr_door.o	\
47	pr_exit.o	\
48	pr_fcntl.o	\
49	pr_getitimer.o	\
50	pr_getrctl.o	\
51	pr_getrlimit.o	\
52	pr_getsockname.o \
53	pr_ioctl.o	\
54	pr_lseek.o	\
55	pr_memcntl.o	\
56	pr_meminfo.o	\
57	pr_mmap.o	\
58	pr_open.o	\
59	pr_pbind.o	\
60	pr_rename.o	\
61	pr_sigaction.o	\
62	pr_stat.o	\
63	pr_statvfs.o	\
64	pr_tasksys.o	\
65	pr_waitid.o	\
66	proc_get_info.o	\
67	proc_names.o	\
68	proc_arg.o	\
69	proc_set.o	\
70	proc_stdio.o
71
72ISAOBJS =	\
73	Pisadep.o
74
75amd64_SAVEOBJS = \
76	saveargs.o
77
78amd64_CPPFLAGS = -I$(SRC)/common/saveargs
79
80SAVEOBJS = $($(MACH64)_SAVEOBJS)
81
82OBJECTS = $(CMNOBJS) $(ISAOBJS) $(SAVEOBJS)
83
84# include library definitions
85include ../../Makefile.lib
86include ../../Makefile.rootfs
87
88SRCS =		$(CMNOBJS:%.o=../common/%.c) $(ISAOBJS:%.o=%.c)
89
90LIBS =		$(DYNLIB) $(LINTLIB)
91LDLIBS +=	-lrtld_db -lelf -lctf -lc
92CPPFLAGS +=	$($(MACH64)_CPPFLAGS)
93
94SRCDIR =	../common
95$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
96
97CFLAGS +=	$(CCVERBOSE)
98CPPFLAGS +=	-I$(SRCDIR)
99
100CERRWARN +=	-_gcc=-Wno-uninitialized
101CERRWARN +=	-_gcc=-Wno-parentheses
102CERRWARN +=	-_gcc=-Wno-type-limits
103CERRWARN +=	-_gcc=-Wno-unused-label
104
105# All interfaces are interposable, therefore don't allow direct binding to
106# libproc.  Disable libproc from directly binding to itself, but allow libperl
107# to directly bind to its dependencies (ie. map -Bdirect -> -zdirect).  Ensure
108# lazy loading is established (which is enabled automatically with -Bdirect).
109BDIRECT =
110DYNFLAGS +=	$(BNODIRECT) $(ZDIRECT) $(ZLAZYLOAD)
111
112.KEEP_STATE:
113
114all: $(LIBS)
115
116lint: lintcheck
117
118# include library targets
119include ../../Makefile.targ
120
121objs/%.o pics/%.o: %.c
122	$(COMPILE.c) -o $@ $<
123	$(POST_PROCESS_O)
124
125objs/%.o pics/%.o: $(SRC)/common/saveargs/%.c
126	$(COMPILE.c) -o $@ $<
127	$(POST_PROCESS_O)
128