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
)
64 ROOTLOCKS
= $(RTLCKS
:%=$(ROOTSECDEV
)/%)
65 ROOTSCRIPTS
= $(SCRIPTS
:%=$(ROOTSECLIB
)/%)
67 ROOTPROG
= $(PROGallocate
:%=$(ROOTUSRSBIN
)/%) \
68 $(PROGmkdevalloc
:%=$(ROOTUSRSBIN
)/%) \
69 $(PROGdminfo
:%=$(ROOTUSRSBIN
)/%) \
70 $(PROGaddaloc
:%=$(ROOTUSRSBIN
)/%)
71 ROOTLINKalloc
= $(LINKPROGalloc
:%=$(ROOTUSRSBIN
)/%)
72 ROOTLINKmkdevalloc
= $(LINKPROGmkdevalloc
:%=$(ROOTUSRSBIN
)/%)
73 ROOTLINKS
= $(ROOTLINKalloc
) $(ROOTLINKmkdevalloc
)
75 PROGallocOBJS
= allocate.o allocate3.o
76 PROGmkdevallocOBJS
= mkdevalloc.o
77 PROGdminfoOBJS
= dminfo.o
79 OBJS
= $(PROGallocOBJS
) \
80 $(PROGmkdevallocOBJS
) \
83 SRCS
= $(OBJS
:%.o
=%.c
)
85 $(ROOTUSRSBIN
)/% := FILEMODE
= 555
86 $(ROOTUSRSBIN
)/allocate
:= FILEMODE
= 4555
87 $(ROOTSECDEV
)/% := FILEMODE
= 0400
88 $(ROOTSECLIB
)/% := FILEMODE
= 0555
91 $(PROGalloc
) := LDLIBS
+= -lbsm
-lsec
-lsecdb
92 $(PROGmkdevalloc
) := LDLIBS
+= -lbsm
93 $(PROGdminfo
) := LDLIBS
+= -lbsm
95 CLOBBERFILES
+= $(SCRIPTS
)
99 all : $(PROG
) $(RTLCKS
) $(SCRIPTS
)
101 install : $(PROG
) $(ROOTDIRS
) $(ROOTPROG
) $(ROOTLOCKS
) \
102 $(ROOTSCRIPTS
) $(ROOTLINKS
) $(ROOTMANIFEST
) $(ROOTSVCMETHOD
)
106 $(ROOTSECLIB
)/%: %.sh
109 $(PROGalloc
) : $(PROGallocOBJS
)
110 $(LINK.c
) $(PROGallocOBJS
) -o
$@
$(LDLIBS
)
113 $(PROGmkdevalloc
) : $(PROGmkdevallocOBJS
)
114 $(LINK.c
) $(PROGmkdevallocOBJS
) -o
$@
$(LDLIBS
)
117 $(PROGdminfo
) : $(PROGdminfoOBJS
)
118 $(LINK.c
) $(PROGdminfoOBJS
) -o
$@
$(LDLIBS
)
131 $(ROOTLINKalloc
) : $(PROGalloc
:%=$(ROOTUSRSBIN
)/%)
133 $(LN
) $(PROGalloc
:%=$(ROOTUSRSBIN
)/%) $@
135 $(ROOTLINKmkdevalloc
) : $(PROGmkdevalloc
:%=$(ROOTUSRSBIN
)/%)
137 $(LN
) $(PROGmkdevalloc
:%=$(ROOTUSRSBIN
)/%) $@
140 $(ROOTETCSECLIB
)/%.windowing
: %
144 $(POFILE
): $(POFILES
)
146 $(CAT
) $(POFILES
) > $@
149 # Concatenate all the scripts into one before we build the catalogue.
150 # Done to shrink the catalogue since some messages are shared between
151 # the various scripts.
153 $(ALLSCRIPTS
): $(SCRIPTS
:%=%.sh
)
154 $(CAT
) $(SCRIPTS
:%=%.sh
) > $@
157 $(RM
) $(PROG
) $(RTLCKS
) $(OBJS
) \
158 $(SCRIPTS
) $(ALLSCRIPTS
) $(POFILE
) $(POFILES
)
163 include ..
/Makefile.targ