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