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]
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
46 CLEANaudio
= audio_clean
47 CLEAN_SCRIPTS
= $(CLEANfd
) $(CLEANsr
) $(CLEANst
) $(CLEANaudio
)
48 SCRIPTS
= $(CLEAN_SCRIPTS
)
49 ALLSCRIPTS
= allscripts.sh
52 PROGmkdevalloc
= mkdevalloc
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
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
) \
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
)
100 all : $(PROG
) $(RTLCKS
) $(SCRIPTS
)
102 install : $(PROG
) $(ROOTDIRS
) $(ROOTPROG
) $(ROOTLOCKS
) \
103 $(ROOTSCRIPTS
) $(ROOTLINKS
) $(ROOTMANIFEST
) $(ROOTSVCMETHOD
)
107 $(ROOTSECLIB
)/%: %.sh
110 $(PROGalloc
) : $(PROGallocOBJS
)
111 $(LINK.c
) $(PROGallocOBJS
) -o
$@
$(LDLIBS
)
114 $(PROGmkdevalloc
) : $(PROGmkdevallocOBJS
)
115 $(LINK.c
) $(PROGmkdevallocOBJS
) -o
$@
$(LDLIBS
)
118 $(PROGdminfo
) : $(PROGdminfoOBJS
)
119 $(LINK.c
) $(PROGdminfoOBJS
) -o
$@
$(LDLIBS
)
132 $(ROOTLINKalloc
) : $(PROGalloc
:%=$(ROOTUSRSBIN
)/%)
134 $(LN
) $(PROGalloc
:%=$(ROOTUSRSBIN
)/%) $@
136 $(ROOTLINKmkdevalloc
) : $(PROGmkdevalloc
:%=$(ROOTUSRSBIN
)/%)
138 $(LN
) $(PROGmkdevalloc
:%=$(ROOTUSRSBIN
)/%) $@
141 $(ROOTETCSECLIB
)/%.windowing
: %
145 $(POFILE
): $(POFILES
)
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
) > $@
158 $(RM
) $(PROG
) $(RTLCKS
) $(OBJS
) \
159 $(SCRIPTS
) $(ALLSCRIPTS
) $(POFILE
) $(POFILES
)
164 include ..
/Makefile.targ