xref: /illumos-gate/usr/src/lib/libproc/Makefile.com (revision a61ed2ce7a86a4d6428f2a83eb4739fae945447e)
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# Copyright (c) 2013 by Delphix. All rights reserved.
25#
26# Copyright (c) 2018, Joyent, Inc.
27# Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
28
29LIBRARY = libproc.a
30VERS = .1
31
32CMNOBJS =	\
33	P32ton.o	\
34	Pcontrol.o	\
35	Pcore.o		\
36	Pexecname.o	\
37	Pfdinfo.o	\
38	Pgcore.o	\
39	Pidle.o		\
40	Pisprocdir.o	\
41	Plwpregs.o	\
42	Pservice.o	\
43	Psymtab.o	\
44	Psymtab_machelf32.o \
45	$(CMNOBJS64)	\
46	Pscantext.o	\
47	Pstack.o	\
48	Psyscall.o	\
49	Putil.o		\
50	Pzone.o		\
51	pr_door.o	\
52	pr_exit.o	\
53	pr_fcntl.o	\
54	pr_getitimer.o	\
55	pr_getrctl.o	\
56	pr_getrlimit.o	\
57	pr_getsockname.o \
58	pr_ioctl.o	\
59	pr_lseek.o	\
60	pr_memcntl.o	\
61	pr_meminfo.o	\
62	pr_mmap.o	\
63	pr_open.o	\
64	pr_pbind.o	\
65	pr_rename.o	\
66	pr_sigaction.o	\
67	pr_stat.o	\
68	pr_statvfs.o	\
69	pr_tasksys.o	\
70	pr_waitid.o	\
71	proc_get_info.o	\
72	proc_names.o	\
73	proc_arg.o	\
74	proc_fd.o	\
75	proc_set.o	\
76	proc_stdio.o
77
78ISAOBJS =	\
79	Pisadep.o
80
81OBJECTS = $(CMNOBJS) $(ISAOBJS) $(SAVEOBJS)
82
83# include library definitions
84include ../../Makefile.lib
85include ../../Makefile.rootfs
86
87SRCS =		$(CMNOBJS:%.o=../common/%.c) $(ISAOBJS:%.o=%.c)
88
89LIBS =		$(DYNLIB)
90LDLIBS +=	-lrtld_db -lelf -lctf -lc
91CSTD =	$(CSTD_GNU99)
92CPPFLAGS +=	$($(MACH64)_CPPFLAGS)
93
94SRCDIR =	../common
95
96CFLAGS +=	$(CCVERBOSE)
97CPPFLAGS +=	-I$(SRCDIR)
98
99CERRWARN +=	$(CNOWARN_UNINIT)
100CERRWARN +=	-_gcc=-Wno-parentheses
101CERRWARN +=	-_gcc=-Wno-type-limits
102CERRWARN +=	-_gcc=-Wno-unused-label
103
104# not linted
105SMATCH=off
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
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