xref: /titanic_52/usr/src/cmd/priocntl/Makefile (revision 3c112a2b34403220c06c3e2fcac403358cfba168)
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
26PROG= priocntl
27
28PRIOCNTLOBJ=	$(PROG).o subr.o
29
30PRIOCNTLSRC= $(PRIOCNTLOBJ:%.o=%.c)
31OBJS= $(PRIOCNTLOBJ) rt$(PROG).o ts$(PROG).o ia$(PROG).o fss$(PROG).o \
32	fx$(PROG).o sdc$(PROG).o
33SRCS= $(OBJ:%.o=%.c)
34
35include ../Makefile.cmd
36
37LDLIBS += -lcontract
38
39CLASSD = $(ROOTLIB)/class
40RTD = $(CLASSD)/RT
41SDCD = $(CLASSD)/SDC
42TSD = $(CLASSD)/TS
43IAD = $(CLASSD)/IA
44FSSD = $(CLASSD)/FSS
45FXD = $(CLASSD)/FX
46DIRS = $(CLASSD) $(RTD) $(SDCD) $(TSD) $(IAD) $(FSSD) $(FXD)
47
48RTPROG = RT$(PROG)
49SDCPROG = SDC$(PROG)
50TSPROG = TS$(PROG)
51IAPROG = IA$(PROG)
52FSSPROG = FSS$(PROG)
53FXPROG = FX$(PROG)
54
55ROOTRTPROG = $(RTD)/$(RTPROG)
56ROOTSDCPROG = $(SDCD)/$(SDCPROG)
57ROOTTSPROG = $(TSD)/$(TSPROG)
58ROOTIAPROG = $(IAD)/$(IAPROG)
59ROOTFSSPROG = $(FSSD)/$(FSSPROG)
60ROOTFXPROG = $(FXD)/$(FXPROG)
61
62$(ROOTUSRSBINPROG) := FILEMODE = 04555
63$(DIRS) := FILEMODE = 0775
64CLOBBERFILES += $(RTPROG) $(SDCPROG) $(TSPROG) $(IAPROG) $(FSSPROG) $(FXPROG)
65
66# installation rules
67$(RTD)/% : %
68	$(INS.file)
69
70$(SDCD)/% : %
71	$(INS.file)
72
73$(TSD)/% : %
74	$(INS.file)
75
76$(IAD)/% : %
77	$(INS.file)
78
79$(FSSD)/% : %
80	$(INS.file)
81
82$(FXD)/% : %
83	$(INS.file)
84
85.KEEP_STATE:
86
87all: $(PROG) $(RTPROG) $(SDCPROG) $(TSPROG) $(IAPROG) $(FSSPROG) $(FXPROG)
88
89$(PROG): $(PRIOCNTLOBJ)
90	$(LINK.c) $(PRIOCNTLOBJ) -o $@ $(LDLIBS)
91	$(POST_PROCESS)
92
93$(RTPROG): rt$(PRIOCNTLOBJ)
94	$(LINK.c) rt$(PRIOCNTLOBJ) -o $@ $(LDLIBS)
95	$(POST_PROCESS)
96
97$(SDCPROG): sdc$(PRIOCNTLOBJ)
98	$(LINK.c) sdc$(PRIOCNTLOBJ) -o $@ $(LDLIBS)
99	$(POST_PROCESS)
100
101$(TSPROG): ts$(PRIOCNTLOBJ)
102	$(LINK.c) ts$(PRIOCNTLOBJ) -o $@ $(LDLIBS)
103	$(POST_PROCESS)
104
105$(IAPROG): ia$(PRIOCNTLOBJ)
106	$(LINK.c) ia$(PRIOCNTLOBJ) -o $@ $(LDLIBS)
107	$(POST_PROCESS)
108
109$(FSSPROG): fss$(PRIOCNTLOBJ)
110	$(LINK.c) fss$(PRIOCNTLOBJ) -o $@ $(LDLIBS)
111	$(POST_PROCESS)
112
113$(FXPROG): fx$(PRIOCNTLOBJ)
114	$(LINK.c) fx$(PRIOCNTLOBJ) -o $@ $(LDLIBS)
115	$(POST_PROCESS)
116
117install: all $(DIRS) 	\
118	$(ROOTPROG)	\
119	$(ROOTRTPROG)	\
120	$(ROOTSDCPROG)	\
121	$(ROOTTSPROG)	\
122	$(ROOTIAPROG)	\
123	$(ROOTFSSPROG)	\
124	$(ROOTFXPROG)
125
126$(DIRS):
127	$(INS.dir)
128
129clean:
130	$(RM) $(OBJS)
131
132lint:
133	$(LINT.c) $(PRIOCNTLSRC) $(LDLIBS)
134	$(LINT.c) rt$(PRIOCNTLSRC) $(LDLIBS)
135	$(LINT.c) sdc$(PRIOCNTLSRC) $(LDLIBS)
136	$(LINT.c) ts$(PRIOCNTLSRC) $(LDLIBS)
137	$(LINT.c) ia$(PRIOCNTLSRC) $(LDLIBS)
138	$(LINT.c) fss$(PRIOCNTLSRC) $(LDLIBS)
139	$(LINT.c) fx$(PRIOCNTLSRC) $(LDLIBS)
140
141include ../Makefile.targ
142