Merge illumos-gate
[unleashed.git] / usr / src / lib / libproc / Makefile.com
blob0a96240d7fb426db2f698091804e91a0ae52f791
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
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.
26 # Copyright (c) 2018, Joyent, Inc.
28 LIBRARY = libproc.a
29 VERS = .1
31 CMNOBJS =       \
32         P32ton.o        \
33         Pcontrol.o      \
34         Pcore.o         \
35         Pexecname.o     \
36         Pfdinfo.o       \
37         Pgcore.o        \
38         Pidle.o         \
39         Pisprocdir.o    \
40         Plwpregs.o      \
41         Pservice.o      \
42         Psymtab.o       \
43         Psymtab_machelf32.o \
44         $(CMNOBJS64)    \
45         Pscantext.o     \
46         Pstack.o        \
47         Psyscall.o      \
48         Putil.o         \
49         Pzone.o         \
50         pr_door.o       \
51         pr_exit.o       \
52         pr_fcntl.o      \
53         pr_getitimer.o  \
54         pr_getrctl.o    \
55         pr_getrlimit.o  \
56         pr_getsockname.o \
57         pr_ioctl.o      \
58         pr_lseek.o      \
59         pr_memcntl.o    \
60         pr_meminfo.o    \
61         pr_mmap.o       \
62         pr_open.o       \
63         pr_pbind.o      \
64         pr_rename.o     \
65         pr_sigaction.o  \
66         pr_stat.o       \
67         pr_statvfs.o    \
68         pr_tasksys.o    \
69         pr_waitid.o     \
70         proc_get_info.o \
71         proc_names.o    \
72         proc_arg.o      \
73         proc_set.o      \
74         proc_stdio.o
76 ISAOBJS =       \
77         Pisadep.o
79 OBJECTS = $(CMNOBJS) $(ISAOBJS) $(SAVEOBJS)
81 # include library definitions
82 include ../../Makefile.lib
83 include ../../Makefile.rootfs
85 SRCS =          $(CMNOBJS:%.o=../common/%.c) $(ISAOBJS:%.o=%.c)
87 LIBS =          $(DYNLIB)
88 LDLIBS +=       -lrtld_db -lelf -lctf -lc
89 CSTD =  $(CSTD_GNU99)
90 CPPFLAGS +=     $($(MACH64)_CPPFLAGS)
92 SRCDIR =        ../common
94 CPPFLAGS +=     -I$(SRCDIR)
96 CERRWARN +=     -Wno-uninitialized
97 CERRWARN +=     -Wno-parentheses
98 CERRWARN +=     -Wno-type-limits
99 CERRWARN +=     -Wno-unused-label
101 # not linted
102 SMATCH=off
104 # All interfaces are interposable, therefore don't allow direct binding to
105 # libproc.  Disable libproc from directly binding to itself, but allow libperl
106 # to directly bind to its dependencies (ie. map -Bdirect -> -zdirect).  Ensure
107 # lazy loading is established (which is enabled automatically with -Bdirect).
108 BDIRECT =
109 DYNFLAGS +=     $(BNODIRECT) $(ZDIRECT) $(ZLAZYLOAD)
111 .KEEP_STATE:
113 all: $(LIBS)
115 # include library targets
116 include ../../Makefile.targ
118 objs/%.o pics/%.o: %.c
119         $(COMPILE.c) -o $@ $<
120         $(POST_PROCESS_O)
122 objs/%.o pics/%.o: $(SRC)/common/saveargs/%.c
123         $(COMPILE.c) -o $@ $<
124         $(POST_PROCESS_O)