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 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
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
58 PROGmkdevalloc
= mkdevalloc
60 PROGaddalloc
= add_allocatable
61 PROG
= $(PROGalloc
) $(PROGmkdevalloc
) $(PROGdminfo
) \
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
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
) \
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
)
115 all : $(PROG
) $(RTLCKS
) $(SCRIPTS
)
117 install : $(PROG
) $(ROOTDIRS
) $(ROOTPROG
) $(ROOTLOCKS
) \
118 $(ROOTSCRIPTS
) $(ROOTLINKS
) $(ROOTWDWLINKS
) \
119 $(ROOTETCTSOLFILES
) $(ROOTMANIFEST
) $(ROOTSVCMETHOD
)
123 $(ROOTSECLIB
)/%: %.sh
126 $(PROGalloc
) : $(PROGallocOBJS
)
127 $(LINK.c
) $(PROGallocOBJS
) -o
$@
$(LDLIBS
)
130 $(PROGaddalloc
) : $(PROGaddallocOBJS
)
131 $(LINK.c
) $(PROGaddallocOBJS
) -o
$@
$(LDLIBS
)
134 $(PROGmkdevalloc
) : $(PROGmkdevallocOBJS
)
135 $(LINK.c
) $(PROGmkdevallocOBJS
) -o
$@
$(LDLIBS
)
138 $(PROGdminfo
) : $(PROGdminfoOBJS
)
139 $(LINK.c
) $(PROGdminfoOBJS
) -o
$@
$(LDLIBS
)
152 $(ROOTLINKalloc
) : $(PROGalloc
:%=$(ROOTUSRSBIN
)/%)
154 $(LN
) $(PROGalloc
:%=$(ROOTUSRSBIN
)/%) $@
156 $(ROOTLINKaddalloc
) : $(PROGaddalloc
:%=$(ROOTUSRSBIN
)/%)
158 $(LN
) $(PROGaddalloc
:%=$(ROOTUSRSBIN
)/%) $@
160 $(ROOTLINKmkdevalloc
) : $(PROGmkdevalloc
:%=$(ROOTUSRSBIN
)/%)
162 $(LN
) $(PROGmkdevalloc
:%=$(ROOTUSRSBIN
)/%) $@
165 $(ROOTETCSECLIB
)/%.windowing
: %
169 $(POFILE
): $(POFILES
)
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
) > $@
182 $(RM
) $(PROG
) $(RTLCKS
) $(OBJS
) \
183 $(SCRIPTS
) $(ALLSCRIPTS
) $(POFILE
) $(POFILES
)
190 include ..
/Makefile.targ