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