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 2007 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # ident "%Z%%M% %I%     %E% SMI"
  26 #
  27 
  28 .KEEP_STATE:
  29 .SUFFIXES:
  30 
  31 # 
  32 # subdirs must define COMMON_DIR and include Makefile.com
  33 #
  34 
  35 SRCS =  rcapd_main.c \
  36         rcapd_collection.c \
  37         rcapd_collection_project.c \
  38         rcapd_collection_zone.c \
  39         rcapd_mapping.c \
  40         rcapd_rfd.c \
  41         rcapd_scanner.c \
  42         rcapd_stat.c \
  43         utils.c
  44 
  45 LINTSRCS = ../rcapd_main.c \
  46         ../rcapd_collection.c \
  47         ../rcapd_collection_project.c \
  48         ../rcapd_collection_zone.c \
  49         ../rcapd_mapping.c \
  50         ../rcapd_rfd.c \
  51         ../rcapd_scanner.c \
  52         $(COMMON_DIR)/rcapd_stat.c \
  53         $(COMMON_DIR)/utils.c 
  54 
  55 $(NOT_RELEASE_BUILD)CPPFLAGS    += -DDEBUG
  56 CPPFLAGS                        += -DDEBUG_MSG
  57 CPPFLAGS                        += -I$(COMMON_DIR)
  58 LDLIBS                          += -lkstat -lproc -lproject -lzonecfg -lumem -lscf
  59 LDLIBS                          += $(EXTRA_LDLIBS)
  60 
  61 LINTFLAGS                       += -u
  62 LINTFLAGS64                     += -u
  63 
  64 PROG =                  rcapd
  65 OBJS =                  $(SRCS:%.c=%.o) rcapd_conf.o
  66 
  67 POFILES =               $(OBJS:%.o=%.po)
  68 POFILE =                $(PROG).po
  69 
  70 CLOBBERFILES +=         $(POFILES) $(POFILE)
  71 
  72 .NO_PARALLEL:
  73 .PARALLEL: $(OBJS)
  74 
  75 all: $(PROG)
  76 
  77 $(PROG): $(OBJS)
  78         $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
  79         $(POST_PROCESS)
  80 
  81 %.o: ../%.c
  82         $(COMPILE.c) $<
  83 %.po: ../%.c
  84         $(COMPILE.cpp) $< > $<.i
  85         $(BUILD.po)
  86 
  87 
  88 clean:
  89         $(RM) $(OBJS)
  90         $(RM) rcapd_conf.c
  91 
  92 lint:
  93         $(LINT.c) $(LINTSRCS) $(LDLIBS)
  94 
  95 $(POFILE): $(POFILES)
  96         $(RM) $@
  97         $(CAT) $(POFILES) > $@
  98 
  99 
 100 ROOTUSRLIBRCAP                  = $(ROOT)/usr/lib/rcap
 101 ROOTUSRLIBRCAP32                = $(ROOTUSRLIBRCAP)/$(MACH32)
 102 ROOTUSRLIBRCAP64                = $(ROOTUSRLIBRCAP)/$(MACH64)
 103 ROOTUSRLIBRCAPPROG              = $(ROOTUSRLIBRCAP)/$(PROG)
 104 ROOTUSRLIBRCAPPROG32            = $(ROOTUSRLIBRCAP32)/$(PROG)
 105 ROOTUSRLIBRCAPPROG64            = $(ROOTUSRLIBRCAP64)/$(PROG)
 106 $(ROOTUSRLIBRCAP)/%: $(ROOTUSRLIBRCAP) %
 107         $(INS.file)
 108 $(ROOTUSRLIBRCAP32)/%: $(ROOTUSRLIBRCAP32) %
 109         $(INS.file)
 110 $(ROOTUSRLIBRCAP64)/%: $(ROOTUSRLIBRCAP64) %
 111         $(INS.file)
 112 
 113 include ../../../Makefile.targ