xref: /titanic_44/usr/src/cmd/dispadmin/Makefile (revision f841f6ad96ea6675d6c6b35c749eaac601799fdf)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/dispadmin/Makefile
29#
30
31PROG= dispadmin
32MANIFEST= scheduler.xml
33SVCMETHOD= svc-scheduler
34RT=   RT$(PROG)
35TS=   TS$(PROG)
36IA=   IA$(PROG)
37FSS=  FSS$(PROG)
38FX=   FX$(PROG)
39PROGS= $(PROG) $(RT) $(TS) $(IA) $(FSS) $(FX)
40
41include ../Makefile.cmd
42
43CFLAGS +=	$(CCVERBOSE)
44
45ROOTDIR=	$(ROOT)/usr/lib/class
46ROOTDIRS=	$(ROOTDIR)	\
47		$(ROOTDIR)/RT	\
48		$(ROOTDIR)/TS	\
49		$(ROOTDIR)/IA	\
50		$(ROOTDIR)/FSS	\
51		$(ROOTDIR)/FX
52ROOTPROG=	$(PROG:%=$(ROOTUSRSBIN)/%)
53ROOTRT=		$(RT:%=$(ROOTDIR)/RT/%)
54ROOTTS=		$(TS:%=$(ROOTDIR)/TS/%)
55ROOTIA=		$(IA:%=$(ROOTDIR)/IA/%)
56ROOTFSS=	$(FSS:%=$(ROOTDIR)/FSS/%)
57ROOTFX=		$(FX:%=$(ROOTDIR)/FX/%)
58ROOTMANIFESTDIR=	$(ROOTSVCSYSTEM)
59
60$(ROOTMANIFEST)	:= FILEMODE = 0444
61
62GROUP = bin
63
64# this would be simpler if we renamed rtdispadmin.c and tsdispadmin.c
65OBJECTS= $(PROG).o rt$(PROG).o ts$(PROG).o ia$(PROG).o \
66		fss$(PROG).o fx$(PROG).o subr.o
67
68# conditional assignments, because of above names
69$(PROG):=	OBJ= $(PROG).o
70$(RT):=		OBJ= rt$(PROG).o
71$(TS):=		OBJ= ts$(PROG).o
72$(IA):=		OBJ= ia$(PROG).o
73$(FSS):=	OBJ= fss$(PROG).o
74$(FX):=		OBJ= fx$(PROG).o
75
76# install rules
77$(ROOTDIR)/% \
78$(ROOTDIR)/RT/% \
79$(ROOTDIR)/IA/% \
80$(ROOTDIR)/TS/% \
81$(ROOTDIR)/FSS/% \
82$(ROOTDIR)/FX/% : %
83	$(INS.file)
84
85.KEEP_STATE:
86
87all: $(PROGS)
88
89$(PROGS): $$(OBJ) subr.o
90	$(LINK.c) -o $@ $(OBJ) subr.o $(LDLIBS)
91	$(POST_PROCESS)
92
93llib-lsubr.ln:	subr.c
94	$(LINT.c) -y -o subr subr.c
95
96lint :=	LDLIBS += -L. -lsubr
97
98install: all $(ROOTPROG) $(ROOTRT) $(ROOTTS) $(ROOTIA) $(ROOTFSS) $(ROOTFX) \
99		$(ROOTMANIFEST) $(ROOTSVCMETHOD)
100
101# Don't re-install directories already installed by Targetdirs
102#$(ROOTDIRS):
103#	$(INS.dir)
104
105check: $(CHKMANIFEST)
106
107clean:
108	$(RM) $(OBJECTS) $(PROGS) llib-lsubr.ln
109
110lint:	llib-lsubr.ln
111	$(LINT.c) dispadmin.c $(LDLIBS)
112	$(LINT.c) rtdispadmin.c $(LDLIBS)
113	$(LINT.c) tsdispadmin.c $(LDLIBS)
114	$(LINT.c) iadispadmin.c $(LDLIBS)
115	$(LINT.c) fssdispadmin.c $(LDLIBS)
116	$(LINT.c) fxdispadmin.c $(LDLIBS)
117
118include ../Makefile.targ
119