xref: /titanic_51/usr/src/lib/libproc/Makefile.com (revision c10c16dec587a0662068f6e2991c29ed3a9db943)
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
75OBJECTS = $(CMNOBJS) $(ISAOBJS)
76
77# include library definitions
78include ../../Makefile.lib
79include ../../Makefile.rootfs
80
81SRCS =		$(CMNOBJS:%.o=../common/%.c) $(ISAOBJS:%.o=%.c)
82
83LIBS =		$(DYNLIB) $(LINTLIB)
84LDLIBS +=	-lrtld_db -lelf -lctf -lc
85
86SRCDIR =	../common
87$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
88
89CFLAGS +=	$(CCVERBOSE)
90CPPFLAGS +=	-I$(SRCDIR)
91
92# All interfaces are interposable, therefore don't allow direct binding to
93# libproc.  Disable libproc from directly binding to itself, but allow libperl
94# to directly bind to its dependencies (ie. map -Bdirect -> -zdirect).  Ensure
95# lazy loading is established (which is enabled automatically with -Bdirect).
96BDIRECT =
97DYNFLAGS +=	$(BNODIRECT) $(ZDIRECT) $(ZLAZYLOAD)
98
99.KEEP_STATE:
100
101all: $(LIBS)
102
103lint: lintcheck
104
105# include library targets
106include ../../Makefile.targ
107
108objs/%.o pics/%.o: %.c
109	$(COMPILE.c) -o $@ $<
110	$(POST_PROCESS_O)
111