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