xref: /titanic_52/usr/src/lib/libproc/Makefile.com (revision ebb8ac078e9265f87093fbb363e8c2cbc6ee13e6)
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# Copyright 2012 DEY Storage Systems, Inc.  All rights reserved.
24#
25
26LIBRARY = libproc.a
27VERS = .1
28
29CMNOBJS =	\
30	P32ton.o	\
31	Pcontrol.o	\
32	Pcore.o		\
33	Pexecname.o	\
34	Pfdinfo.o	\
35	Pgcore.o	\
36	Pidle.o		\
37	Pisprocdir.o	\
38	Plwpregs.o	\
39	Pservice.o	\
40	Psymtab.o	\
41	Psymtab_machelf32.o \
42	$(CMNOBJS64)	\
43	Pscantext.o	\
44	Pstack.o	\
45	Psyscall.o	\
46	Putil.o		\
47	Pzone.o		\
48	pr_door.o	\
49	pr_exit.o	\
50	pr_fcntl.o	\
51	pr_getitimer.o	\
52	pr_getrctl.o	\
53	pr_getrlimit.o	\
54	pr_getsockname.o \
55	pr_ioctl.o	\
56	pr_lseek.o	\
57	pr_memcntl.o	\
58	pr_meminfo.o	\
59	pr_mmap.o	\
60	pr_open.o	\
61	pr_pbind.o	\
62	pr_rename.o	\
63	pr_sigaction.o	\
64	pr_stat.o	\
65	pr_statvfs.o	\
66	pr_tasksys.o	\
67	pr_waitid.o	\
68	proc_get_info.o	\
69	proc_names.o	\
70	proc_arg.o	\
71	proc_set.o	\
72	proc_stdio.o
73
74ISAOBJS =	\
75	Pisadep.o
76
77amd64_SAVEOBJS = \
78	saveargs.o
79
80amd64_CPPFLAGS = -I$(SRC)/common/saveargs
81
82SAVEOBJS = $($(MACH64)_SAVEOBJS)
83
84OBJECTS = $(CMNOBJS) $(ISAOBJS) $(SAVEOBJS)
85
86# include library definitions
87include ../../Makefile.lib
88include ../../Makefile.rootfs
89
90SRCS =		$(CMNOBJS:%.o=../common/%.c) $(ISAOBJS:%.o=%.c)
91
92LIBS =		$(DYNLIB) $(LINTLIB)
93LDLIBS +=	-lrtld_db -lelf -lctf -lc
94CPPFLAGS +=	$($(MACH64)_CPPFLAGS)
95
96SRCDIR =	../common
97$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
98
99CFLAGS +=	$(CCVERBOSE)
100CPPFLAGS +=	-I$(SRCDIR)
101
102CERRWARN +=	-_gcc=-Wno-uninitialized
103CERRWARN +=	-_gcc=-Wno-parentheses
104CERRWARN +=	-_gcc=-Wno-type-limits
105CERRWARN +=	-_gcc=-Wno-unused-label
106
107# All interfaces are interposable, therefore don't allow direct binding to
108# libproc.  Disable libproc from directly binding to itself, but allow libperl
109# to directly bind to its dependencies (ie. map -Bdirect -> -zdirect).  Ensure
110# lazy loading is established (which is enabled automatically with -Bdirect).
111BDIRECT =
112DYNFLAGS +=	$(BNODIRECT) $(ZDIRECT) $(ZLAZYLOAD)
113
114.KEEP_STATE:
115
116all: $(LIBS)
117
118lint: lintcheck
119
120# include library targets
121include ../../Makefile.targ
122
123objs/%.o pics/%.o: %.c
124	$(COMPILE.c) -o $@ $<
125	$(POST_PROCESS_O)
126
127objs/%.o pics/%.o: $(SRC)/common/saveargs/%.c
128	$(COMPILE.c) -o $@ $<
129	$(POST_PROCESS_O)
130