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 
  26 LIBRARY = libproc.a
  27 VERS = .1
  28 
  29 CMNOBJS =       \
  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 
  74 ISAOBJS =       \
  75         Pisadep.o
  76 
  77 amd64_SAVEOBJS = \
  78         saveargs.o
  79 
  80 amd64_CPPFLAGS = -I$(SRC)/common/saveargs
  81 
  82 SAVEOBJS = $($(MACH64)_SAVEOBJS)
  83 
  84 OBJECTS = $(CMNOBJS) $(ISAOBJS) $(SAVEOBJS)
  85 
  86 # include library definitions
  87 include ../../Makefile.lib
  88 include ../../Makefile.rootfs
  89 
  90 SRCS =          $(CMNOBJS:%.o=../common/%.c) $(ISAOBJS:%.o=%.c)
  91 
  92 LIBS =          $(DYNLIB) $(LINTLIB)
  93 LDLIBS +=       -lrtld_db -lelf -lctf -lc
  94 CPPFLAGS +=     $($(MACH64)_CPPFLAGS)
  95 
  96 SRCDIR =        ../common
  97 $(LINTLIB) :=   SRCS = $(SRCDIR)/$(LINTSRC)
  98 
  99 CFLAGS +=       $(CCVERBOSE)
 100 CPPFLAGS +=     -I$(SRCDIR)
 101 
 102 CERRWARN +=     -_gcc=-Wno-uninitialized
 103 CERRWARN +=     -_gcc=-Wno-parentheses
 104 CERRWARN +=     -_gcc=-Wno-type-limits
 105 CERRWARN +=     -_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).
 111 BDIRECT =
 112 DYNFLAGS +=     $(BNODIRECT) $(ZDIRECT) $(ZLAZYLOAD)
 113 
 114 .KEEP_STATE:
 115 
 116 all: $(LIBS)
 117 
 118 lint: lintcheck
 119 
 120 # include library targets
 121 include ../../Makefile.targ
 122 
 123 objs/%.o pics/%.o: %.c
 124         $(COMPILE.c) -o $@ $<
 125         $(POST_PROCESS_O)
 126 
 127 objs/%.o pics/%.o: $(SRC)/common/saveargs/%.c
 128         $(COMPILE.c) -o $@ $<
 129         $(POST_PROCESS_O)