8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / allocate / Makefile
blob41339cdde6698c0ce20f5e970a7525f442ec6fbb
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
23 # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
26 ETCTSOLFILES = devalloc_defaults
28 include ../Makefile.cmd
30 CERRWARN += -_gcc=-Wno-unused-value
31 CERRWARN += -_gcc=-Wno-uninitialized
32 CERRWARN += -_gcc=-Wno-parentheses
33 CERRWARN += -_gcc=-Wno-clobbered
35 ROOTSEC = $(ROOTETC)/security
36 ROOTSECDEV = $(ROOTSEC)/dev
37 ROOTSECLIB = $(ROOTSEC)/lib
38 ROOTSECAUD = $(ROOTSEC)/audio
39 ROOTDIRS = $(ROOTSECDEV) $(ROOTSECLIB) $(ROOTSECAUD)
41 ROOTMANIFESTDIR= $(ROOTSVCSYSTEMDEVICE)
42 SVCMETHOD = svc-allocate
43 MANIFEST = allocate.xml
45 RTLCKS = audio fd0 sr0 st0 st1
46 CLEANfd = fd_clean
47 CLEANsr = sr_clean
48 CLEANst = st_clean
49 CLEANaudio = audio_clean
50 CLEANdisk = disk_clean
51 CLEAN_SCRIPTS = $(CLEANfd) $(CLEANsr) $(CLEANst) $(CLEANaudio) $(CLEANdisk)
52 WDW_SCRIPTS = wdwmsg wdwwrapper
53 WDW_LINKS = $(CLEANaudio) $(CLEANdisk) $(CLEANst)
54 SCRIPTS = $(CLEAN_SCRIPTS) $(WDW_SCRIPTS)
55 ALLSCRIPTS = allscripts.sh
57 PROGalloc = allocate
58 PROGmkdevalloc = mkdevalloc
59 PROGdminfo = dminfo
60 PROGaddalloc = add_allocatable
61 PROG = $(PROGalloc) $(PROGmkdevalloc) $(PROGdminfo) \
62 $(PROGaddalloc)
64 LINKPROGalloc = deallocate list_devices
65 LINKPROGmkdevalloc = mkdevmaps
66 LINKPROGaddalloc = remove_allocatable
68 POFILE = allocate_all.po
69 POFILES = $(OBJS:%.o=%.po) $(ALLSCRIPTS:%.sh=%.po)
71 DFLAGS += -D_REENTRANT
72 CPPFLAGS += $(DFLAGS)
74 ROOTLOCKS = $(RTLCKS:%=$(ROOTSECDEV)/%)
75 ROOTSCRIPTS = $(SCRIPTS:%=$(ROOTSECLIB)/%)
76 ROOTWDWLINKS = $(WDW_LINKS:%=$(ROOTSECLIB)/%.windowing)
78 ROOTPROG = $(PROGallocate:%=$(ROOTUSRSBIN)/%) \
79 $(PROGmkdevalloc:%=$(ROOTUSRSBIN)/%) \
80 $(PROGdminfo:%=$(ROOTUSRSBIN)/%) \
81 $(PROGaddaloc:%=$(ROOTUSRSBIN)/%)
82 ROOTLINKalloc = $(LINKPROGalloc:%=$(ROOTUSRSBIN)/%)
83 ROOTLINKmkdevalloc = $(LINKPROGmkdevalloc:%=$(ROOTUSRSBIN)/%)
84 ROOTLINKaddalloc = $(LINKPROGaddalloc:%=$(ROOTUSRSBIN)/%)
85 ROOTLINKS = $(ROOTLINKalloc) $(ROOTLINKmkdevalloc) $(ROOTLINKaddalloc)
87 PROGallocOBJS = allocate.o allocate3.o
88 PROGmkdevallocOBJS = mkdevalloc.o
89 PROGdminfoOBJS = dminfo.o
90 PROGaddallocOBJS = add_allocatable.o
92 OBJS = $(PROGallocOBJS) \
93 $(PROGmkdevallocOBJS) \
94 $(PROGdminfoOBJS) \
95 $(PROGaddallocOBJS)
97 SRCS = $(OBJS:%.o=%.c)
99 $(ROOTUSRSBIN)/% := FILEMODE = 555
100 $(ROOTUSRSBIN)/allocate := FILEMODE = 4555
101 $(ROOTSECDEV)/% := FILEMODE = 0400
102 $(ROOTSECLIB)/% := FILEMODE = 0555
104 lint := LDLIBS += -lbsm -lsec -lsecdb -ldevinfo -ltsol
106 $(PROGalloc) := LDLIBS += -lbsm -lsec -lsecdb -ldevinfo -ltsol
107 $(PROGmkdevalloc) := LDLIBS += -lbsm
108 $(PROGdminfo) := LDLIBS += -lbsm
109 $(PROGaddalloc) := LDLIBS += -lbsm -lsecdb -ltsol
111 CLOBBERFILES += $(SCRIPTS)
113 .KEEP_STATE:
115 all : $(PROG) $(RTLCKS) $(SCRIPTS)
117 install : $(PROG) $(ROOTDIRS) $(ROOTPROG) $(ROOTLOCKS) \
118 $(ROOTSCRIPTS) $(ROOTLINKS) $(ROOTWDWLINKS) \
119 $(ROOTETCTSOLFILES) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
120 $(RTLCKS):
121 $(TOUCH) $@
123 $(ROOTSECLIB)/%: %.sh
124 $(INS.rename)
126 $(PROGalloc) : $(PROGallocOBJS)
127 $(LINK.c) $(PROGallocOBJS) -o $@ $(LDLIBS)
128 $(POST_PROCESS)
130 $(PROGaddalloc) : $(PROGaddallocOBJS)
131 $(LINK.c) $(PROGaddallocOBJS) -o $@ $(LDLIBS)
132 $(POST_PROCESS)
134 $(PROGmkdevalloc) : $(PROGmkdevallocOBJS)
135 $(LINK.c) $(PROGmkdevallocOBJS) -o $@ $(LDLIBS)
136 $(POST_PROCESS)
138 $(PROGdminfo) : $(PROGdminfoOBJS)
139 $(LINK.c) $(PROGdminfoOBJS) -o $@ $(LDLIBS)
140 $(POST_PROCESS)
142 $(ROOTDIRS) :
143 $(INS.dir)
145 $(ROOTSECDEV)/%: %
146 $(INS.file)
148 $(ROOTSECLIB)/%: %
149 $(RM) $@
150 $(INS.file)
152 $(ROOTLINKalloc) : $(PROGalloc:%=$(ROOTUSRSBIN)/%)
153 $(RM) $@
154 $(LN) $(PROGalloc:%=$(ROOTUSRSBIN)/%) $@
156 $(ROOTLINKaddalloc) : $(PROGaddalloc:%=$(ROOTUSRSBIN)/%)
157 $(RM) $@
158 $(LN) $(PROGaddalloc:%=$(ROOTUSRSBIN)/%) $@
160 $(ROOTLINKmkdevalloc) : $(PROGmkdevalloc:%=$(ROOTUSRSBIN)/%)
161 $(RM) $@
162 $(LN) $(PROGmkdevalloc:%=$(ROOTUSRSBIN)/%) $@
165 $(ROOTETCSECLIB)/%.windowing: %
166 $(RM) $@
167 $(SYMLINK) $< $@
169 $(POFILE): $(POFILES)
170 $(RM) $@
171 $(CAT) $(POFILES) > $@
174 # Concatenate all the scripts into one before we build the catalogue.
175 # Done to shrink the catalogue since some messages are shared between
176 # the various scripts.
178 $(ALLSCRIPTS): $(SCRIPTS:%=%.sh)
179 $(CAT) $(SCRIPTS:%=%.sh) > $@
181 clean :
182 $(RM) $(PROG) $(RTLCKS) $(OBJS) \
183 $(SCRIPTS) $(ALLSCRIPTS) $(POFILE) $(POFILES)
185 lint : lint_SRCS
187 strip :
188 $(STRIP) $(PROG)
190 include ../Makefile.targ