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