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