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