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 28 LIBRARY = libproc.a 29 VERS = .1 30 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 75 76 ISAOBJS = \ 77 Pisadep.o 78 79 OBJECTS = $(CMNOBJS) $(ISAOBJS) $(SAVEOBJS) 80 81 # include library definitions 82 include ../../Makefile.lib 83 include ../../Makefile.rootfs 84 85 SRCS = $(CMNOBJS:%.o=../common/%.c) $(ISAOBJS:%.o=%.c) 86 87 LIBS = $(DYNLIB) $(LINTLIB) 88 LDLIBS += -lrtld_db -lelf -lctf -lc 89 CSTD = $(CSTD_GNU99) 90 CPPFLAGS += $($(MACH64)_CPPFLAGS) 91 92 SRCDIR = ../common 93 $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) 94 95 CFLAGS += $(CCVERBOSE) 96 CPPFLAGS += -I$(SRCDIR) 97 98 CERRWARN += $(CNOWARN_UNINIT) 99 CERRWARN += -_gcc=-Wno-parentheses 100 CERRWARN += -_gcc=-Wno-type-limits 101 CERRWARN += -_gcc=-Wno-unused-label 102 103 # not linted 104 SMATCH=off 105 106 # All interfaces are interposable, therefore don't allow direct binding to 107 # libproc. Disable libproc from directly binding to itself, but allow libperl 108 # to directly bind to its dependencies (ie. map -Bdirect -> -zdirect). Ensure 109 # lazy loading is established (which is enabled automatically with -Bdirect). 110 BDIRECT = 111 DYNFLAGS += $(BNODIRECT) $(ZDIRECT) $(ZLAZYLOAD) 112 113 .KEEP_STATE: 114 115 all: $(LIBS) 116 117 lint: lintcheck 118 119 # include library targets 120 include ../../Makefile.targ 121 122 objs/%.o pics/%.o: %.c 123 $(COMPILE.c) -o $@ $< 124 $(POST_PROCESS_O) 125 126 objs/%.o pics/%.o: $(SRC)/common/saveargs/%.c 127 $(COMPILE.c) -o $@ $< 128 $(POST_PROCESS_O)