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