kill tsol ("Trusted Solaris") aka TX ("Trusted Extensions")
[unleashed.git] / usr / src / cmd / allocate / Makefile
blobe9b0cb6b513ae077642747464ccd508a8a15a91d
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 include ../Makefile.cmd
28 CERRWARN += -Wno-unused-value
29 CERRWARN += -Wno-uninitialized
30 CERRWARN += -Wno-parentheses
31 CERRWARN += -Wno-clobbered
33 ROOTSEC = $(ROOTETC)/security
34 ROOTSECDEV = $(ROOTSEC)/dev
35 ROOTSECLIB = $(ROOTSEC)/lib
36 ROOTDIRS = $(ROOTSECDEV) $(ROOTSECLIB)
38 ROOTMANIFESTDIR= $(ROOTSVCSYSTEMDEVICE)
39 SVCMETHOD = svc-allocate
40 MANIFEST = allocate.xml
42 RTLCKS = audio fd0 sr0 st0 st1
43 CLEANfd = fd_clean
44 CLEANsr = sr_clean
45 CLEANst = st_clean
46 CLEANaudio = audio_clean
47 CLEAN_SCRIPTS = $(CLEANfd) $(CLEANsr) $(CLEANst) $(CLEANaudio)
48 SCRIPTS = $(CLEAN_SCRIPTS)
49 ALLSCRIPTS = allscripts.sh
51 PROGalloc = allocate
52 PROGmkdevalloc = mkdevalloc
53 PROGdminfo = dminfo
54 PROG = $(PROGalloc) $(PROGmkdevalloc) $(PROGdminfo)
56 LINKPROGalloc = deallocate list_devices
57 LINKPROGmkdevalloc = mkdevmaps
59 POFILE = allocate_all.po
60 POFILES = $(OBJS:%.o=%.po) $(ALLSCRIPTS:%.sh=%.po)
62 DFLAGS += -D_REENTRANT
63 CPPFLAGS += $(DFLAGS)
65 ROOTLOCKS = $(RTLCKS:%=$(ROOTSECDEV)/%)
66 ROOTSCRIPTS = $(SCRIPTS:%=$(ROOTSECLIB)/%)
68 ROOTPROG = $(PROGallocate:%=$(ROOTUSRSBIN)/%) \
69 $(PROGmkdevalloc:%=$(ROOTUSRSBIN)/%) \
70 $(PROGdminfo:%=$(ROOTUSRSBIN)/%) \
71 $(PROGaddaloc:%=$(ROOTUSRSBIN)/%)
72 ROOTLINKalloc = $(LINKPROGalloc:%=$(ROOTUSRSBIN)/%)
73 ROOTLINKmkdevalloc = $(LINKPROGmkdevalloc:%=$(ROOTUSRSBIN)/%)
74 ROOTLINKS = $(ROOTLINKalloc) $(ROOTLINKmkdevalloc)
76 PROGallocOBJS = allocate.o allocate3.o
77 PROGmkdevallocOBJS = mkdevalloc.o
78 PROGdminfoOBJS = dminfo.o
80 OBJS = $(PROGallocOBJS) \
81 $(PROGmkdevallocOBJS) \
82 $(PROGdminfoOBJS)
84 SRCS = $(OBJS:%.o=%.c)
86 $(ROOTUSRSBIN)/% := FILEMODE = 555
87 $(ROOTUSRSBIN)/allocate := FILEMODE = 4555
88 $(ROOTSECDEV)/% := FILEMODE = 0400
89 $(ROOTSECLIB)/% := FILEMODE = 0555
92 $(PROGalloc) := LDLIBS += -lbsm -lsec -lsecdb
93 $(PROGmkdevalloc) := LDLIBS += -lbsm
94 $(PROGdminfo) := LDLIBS += -lbsm
96 CLOBBERFILES += $(SCRIPTS)
98 .KEEP_STATE:
100 all : $(PROG) $(RTLCKS) $(SCRIPTS)
102 install : $(PROG) $(ROOTDIRS) $(ROOTPROG) $(ROOTLOCKS) \
103 $(ROOTSCRIPTS) $(ROOTLINKS) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
104 $(RTLCKS):
105 $(TOUCH) $@
107 $(ROOTSECLIB)/%: %.sh
108 $(INS.rename)
110 $(PROGalloc) : $(PROGallocOBJS)
111 $(LINK.c) $(PROGallocOBJS) -o $@ $(LDLIBS)
112 $(POST_PROCESS)
114 $(PROGmkdevalloc) : $(PROGmkdevallocOBJS)
115 $(LINK.c) $(PROGmkdevallocOBJS) -o $@ $(LDLIBS)
116 $(POST_PROCESS)
118 $(PROGdminfo) : $(PROGdminfoOBJS)
119 $(LINK.c) $(PROGdminfoOBJS) -o $@ $(LDLIBS)
120 $(POST_PROCESS)
122 $(ROOTDIRS) :
123 $(INS.dir)
125 $(ROOTSECDEV)/%: %
126 $(INS.file)
128 $(ROOTSECLIB)/%: %
129 $(RM) $@
130 $(INS.file)
132 $(ROOTLINKalloc) : $(PROGalloc:%=$(ROOTUSRSBIN)/%)
133 $(RM) $@
134 $(LN) $(PROGalloc:%=$(ROOTUSRSBIN)/%) $@
136 $(ROOTLINKmkdevalloc) : $(PROGmkdevalloc:%=$(ROOTUSRSBIN)/%)
137 $(RM) $@
138 $(LN) $(PROGmkdevalloc:%=$(ROOTUSRSBIN)/%) $@
141 $(ROOTETCSECLIB)/%.windowing: %
142 $(RM) $@
143 $(SYMLINK) $< $@
145 $(POFILE): $(POFILES)
146 $(RM) $@
147 $(CAT) $(POFILES) > $@
150 # Concatenate all the scripts into one before we build the catalogue.
151 # Done to shrink the catalogue since some messages are shared between
152 # the various scripts.
154 $(ALLSCRIPTS): $(SCRIPTS:%=%.sh)
155 $(CAT) $(SCRIPTS:%=%.sh) > $@
157 clean :
158 $(RM) $(PROG) $(RTLCKS) $(OBJS) \
159 $(SCRIPTS) $(ALLSCRIPTS) $(POFILE) $(POFILES)
161 strip :
162 $(STRIP) $(PROG)
164 include ../Makefile.targ