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