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 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # cmd/dispadmin/Makefile
  26 #
  27 
  28 PROG= dispadmin
  29 MANIFEST= scheduler.xml
  30 SVCMETHOD= svc-scheduler
  31 SDC=  SDC$(PROG)
  32 RT=   RT$(PROG)
  33 TS=   TS$(PROG)
  34 IA=   IA$(PROG)
  35 FSS=  FSS$(PROG)
  36 FX=   FX$(PROG)
  37 PROGS= $(PROG) $(RT) $(TS) $(IA) $(FSS) $(FX) $(SDC)
  38 
  39 include ../Makefile.cmd
  40 
  41 CFLAGS +=       $(CCVERBOSE)
  42 CERRWARN +=     -_gcc=-Wno-uninitialized
  43 
  44 ROOTDIR=        $(ROOT)/usr/lib/class
  45 ROOTDIRS=       $(ROOTDIR)      \
  46                 $(ROOTDIR)/FSS  \
  47                 $(ROOTDIR)/FX   \
  48                 $(ROOTDIR)/IA   \
  49                 $(ROOTDIR)/RT   \
  50                 $(ROOTDIR)/SDC  \
  51                 $(ROOTDIR)/TS
  52 
  53 ROOTPROG=       $(PROG:%=$(ROOTUSRSBIN)/%)
  54 ROOTFSS=        $(FSS:%=$(ROOTDIR)/FSS/%)
  55 ROOTFX=         $(FX:%=$(ROOTDIR)/FX/%)
  56 ROOTIA=         $(IA:%=$(ROOTDIR)/IA/%)
  57 ROOTRT=         $(RT:%=$(ROOTDIR)/RT/%)
  58 ROOTSDC=        $(SDC:%=$(ROOTDIR)/SDC/%)
  59 ROOTTS=         $(TS:%=$(ROOTDIR)/TS/%)
  60 ROOTMANIFESTDIR=        $(ROOTSVCSYSTEM)
  61 
  62 # this would be simpler if we renamed rtdispadmin.c and tsdispadmin.c
  63 OBJECTS= $(PROG).o rt$(PROG).o ts$(PROG).o ia$(PROG).o \
  64                 fss$(PROG).o fx$(PROG).o sdc$(PROG).o subr.o
  65 
  66 # conditional assignments, because of above names
  67 $(PROG):=       OBJ= $(PROG).o
  68 $(FSS):=        OBJ= fss$(PROG).o
  69 $(FX):=         OBJ= fx$(PROG).o
  70 $(IA):=         OBJ= ia$(PROG).o
  71 $(RT):=         OBJ= rt$(PROG).o
  72 $(SDC):=        OBJ= sdc$(PROG).o
  73 $(TS):=         OBJ= ts$(PROG).o
  74 
  75 # install rules
  76 $(ROOTDIR)/% \
  77 $(ROOTDIR)/FSS/% \
  78 $(ROOTDIR)/FX/% \
  79 $(ROOTDIR)/IA/% \
  80 $(ROOTDIR)/RT/% \
  81 $(ROOTDIR)/SDC/% \
  82 $(ROOTDIR)/TS/% : %
  83         $(INS.file)
  84 
  85 .KEEP_STATE:
  86  
  87 all: $(PROGS) 
  88 
  89 $(PROGS): $$(OBJ) subr.o
  90         $(LINK.c) -o $@ $(OBJ) subr.o $(LDLIBS)
  91         $(POST_PROCESS)
  92 
  93 llib-lsubr.ln:  subr.c
  94         $(LINT.c) -y -o subr subr.c
  95 
  96 lint := LDLIBS += -L. -lsubr
  97 
  98 install: all $(ROOTPROG) $(ROOTRT) $(ROOTTS) $(ROOTIA) $(ROOTFSS) $(ROOTFX) \
  99                 $(ROOTSDC) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
 100 
 101 # Don't re-install directories already installed by Targetdirs
 102 #$(ROOTDIRS):
 103 #       $(INS.dir)
 104 
 105 check: $(CHKMANIFEST)
 106 
 107 clean:
 108         $(RM) $(OBJECTS) $(PROGS) llib-lsubr.ln
 109  
 110 lint:   llib-lsubr.ln
 111         $(LINT.c) dispadmin.c $(LDLIBS)
 112         $(LINT.c) fssdispadmin.c $(LDLIBS)
 113         $(LINT.c) fxdispadmin.c $(LDLIBS)
 114         $(LINT.c) iadispadmin.c $(LDLIBS)
 115         $(LINT.c) rtdispadmin.c $(LDLIBS)
 116         $(LINT.c) sdcdispadmin.c $(LDLIBS)
 117         $(LINT.c) tsdispadmin.c $(LDLIBS)
 118  
 119 include ../Makefile.targ