]> git.saurik.com Git - apple/libc.git/blame_incremental - Makefile.xbs
Libc-391.5.18.tar.gz
[apple/libc.git] / Makefile.xbs
... / ...
CommitLineData
1# This is a replacement for bsd.lib.mk for the libc project to get it
2# doing the Right Thing in XBS, which is substantially different than
3# the BSD build system.
4#
5# The main problems arise when libc.a isn't meant to be static, but
6# libc_static.a is. We also build a debug version of the library
7# in addition to shared, static, and profile. Also, we build all
8# versions of libc with debugging enabled, unstripped. The BSD style
9# is to strip every object file after it is built but here, libc.a
10# will get merged into the larger libSystem.dylib, which will eventually
11# be stripped. We also don't build a libc.dylib, since it will be
12# munged into libSystem.dylib.
13#
14# And another difference, B&I wishes to build the 4 incarnations of Libc
15# in parallel on different machines. To do this, we must look at the
16# RC_ProjectName variable (which B&I sets) to determine which of the 4
17# versions of Libc we will be building. Remember that the installhdrs
18# pass should only be invoked on one of the 4 versions, and man pages
19# should only be installed once as well. Both of these get done when
20# we're invoked as "Libc".
21
22BSDMAKE = bsdmake -f Makefile
23
24.PATH: .
25.MAIN: all
26all: libc.a libc_static.a libc_debug.a libc_profile.a
27install: installhdrs install_libc.a install_libc_static.a \
28 install_libc_profile.a install_libc_debug.a autopatchman maninstall
29
30.SUFFIXES:
31.SUFFIXES: .o .po .So .do
32.SUFFIXES: .S .s .c .cc .cpp .cxx .m .C
33.SUFFIXES: -fbsd.c -nbsd.c -obsd.c -uuid.c .3-uuid.in .3
34.SUFFIXES: .f .y .l .defs .h
35.SUFFIXES: User.c User.o User.po User.So User.do
36.SUFFIXES: Server.c Server.o Server.po Server.So Server.do
37
38OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
39DOBJS+= ${OBJS:.o=.do}
40POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po}
41SOBJS+= ${OBJS:.o=.So}
42
43#### 128-bit Long Double libc-ldbl128 for Panther ####################
44.if (${MACHINE_ARCH} == ppc)
45LIB128= ${LIB}-ldbl128
46LDBL_128_SRCS= _hdtoa.c _ldbl_util.c _ldtoa.c asprintf.c err.c fprintf.c \
47 fscanf.c fwprintf.c fwscanf.c gdtoa-strtopdd.c machdep_ldisdd.c \
48 printf.c scanf.c snprintf.c sprintf.c sscanf.c swprintf.c swscanf.c \
49 vasprintf.c vfprintf.c vfscanf.c vfwprintf.c vfwscanf.c vprintf.c \
50 vscanf.c vsnprintf.c vsprintf.c vsscanf.c vswprintf.c vswscanf.c \
51 vwprintf.c vwscanf.c wcstold.c wprintf.c wscanf.c \
52 oldldbl64.s oldsyslog.c LDBL/oldsyslog-LDBL.c \
53 LDBL/err-LDBL.c LDBL/vfprintf-LDBL.c LDBL/vfwprintf-LDBL.c
54LDBL_128_OBJS= ${LDBL_128_SRCS:R:S/$/.o/g}
55LDBL_128_DOBJS= ${LDBL_128_OBJS:.o=.do}
56LDBL_128_POBJS= ${LDBL_128_OBJS:.o=.po}
57LDBL_128_SOBJS= ${LDBL_128_OBJS:.o=.So}
58
59LDBLSRCS2+= oldsyslog.c
60SRCS2+= oldldbl64.s oldsyslog.c
61OBJS2+= ${SRCS2:N*.h:R:S/$/.o/g}
62DOBJS2+= ${OBJS2:.o=.do}
63POBJS2+= ${OBJS2:.o=.po}
64SOBJS2+= ${OBJS2:.o=.So}
65.endif
66
67#### Variant Rules ####################################################
68# The following magic is used for variants to avoid the exponental explosion
69# of suffix rules. To add a variant, select a name (typically all-caps).
70# Add that name to the VARIANTS variable. Create a CFLAGS_XXX variable
71# (XXX is the variant name) that contains the extra flags to pass to the
72# compiler (currently, no slashes are permitted in the flags). Then, just
73# define a XXXSRCS variable with the names of the files to recompile with the
74# additional flags. For auto-patched files, don't use the auto-patched file
75# name. Just use the original file name.
76#
77# Note that this magic also deals with combinations of variants; e.g.,
78# for two variants XXX and YYY, there are three variant combinations,
79# XXX, XXX-YYY and YYY. In this example, you can use XXX-YYYSRCS to
80# specify sources that will build with both the CFLAGS_XXX and CFLAGS_YYY
81# flags set. The variants are always in alphabetic order.
82#
83VARIANTS=
84# Append the 64-bit long double sources (ppc only)
85.if (${MACHINE_ARCH} == ppc)
86VARIANTS+= LDBL
87MDSRCS += ldbl64.s
88.endif
89# build UNIX03 variant except on LP64
90.ifndef LP64
91VARIANTS+= UNIX03
92.endif
93CFLAGS+= ${VARIANTCFLAGS}
94
95CFLAGS_UNIX03= -U__DARWIN_UNIX03 -D__DARWIN_UNIX03=1
96CFLAGS_LDBL= -mlong-double-64 -DLDBL_COMPAT
97
98.for _v in ${VARIANTS}
99COMBOARGS+= ${_v}/${CFLAGS_${_v}}
100.endfor
101.ifdef COMBOARGS
102# makeCombos is a perl script that creates all the variant combinations
103# and all the combinations of flags
104VARIANTCOMBOCFLAGS != ${.CURDIR}/makeCombos ${COMBOARGS}
105.endif
106# For each of the variant combinations as target (and possibly suffixed with
107# _D, _P, and _S for the four kinds on compile styles, we create a subdirectory
108# to do the compiling in, and then call $(BSDMAKE) with the new directory, and
109# setting VARIANTCFLAGS, which are the extra flags to be added to CFLAGS.
110.for _v in ${VARIANTCOMBOCFLAGS}
111VARIANTCOMBOS+= ${_v:H:S,/,,}
112${_v:H:S,/,,}:
113.ifdef ${_v:H:S,/,,}SRCS
114 mkdir -p ${MAKEOBJDIR}/${_v:H:S,/,,}; \
115 MAKEOBJDIR="$(MAKEOBJDIR)/${_v:H:S,/,,}" VARIANTCFLAGS="-DBUILDING_VARIANT ${_v:T:S/@/ /g}" $(BSDMAKE) -C "${.CURDIR}" build_${_v:H:S,/,,}
116.endif
117${_v:H:S,/,,}_D:
118.ifdef ${_v:H:S,/,,}SRCS
119 mkdir -p ${MAKEOBJDIR}/${_v:H:S,/,,}; \
120 MAKEOBJDIR="$(MAKEOBJDIR)/${_v:H:S,/,,}" VARIANTCFLAGS="-DBUILDING_VARIANT ${_v:T:S/@/ /g}" $(BSDMAKE) -C "${.CURDIR}" build_${_v:H:S,/,,}_D
121.endif
122${_v:H:S,/,,}_P:
123.ifdef ${_v:H:S,/,,}SRCS
124 mkdir -p ${MAKEOBJDIR}/${_v:H:S,/,,}; \
125 MAKEOBJDIR="$(MAKEOBJDIR)/${_v:H:S,/,,}" VARIANTCFLAGS="-DBUILDING_VARIANT ${_v:T:S/@/ /g}" $(BSDMAKE) -C "${.CURDIR}" build_${_v:H:S,/,,}_P
126.endif
127${_v:H:S,/,,}_S:
128.ifdef ${_v:H:S,/,,}SRCS
129 mkdir -p ${MAKEOBJDIR}/${_v:H:S,/,,}; \
130 MAKEOBJDIR="$(MAKEOBJDIR)/${_v:H:S,/,,}" VARIANTCFLAGS="-DBUILDING_VARIANT ${_v:T:S/@/ /g}" $(BSDMAKE) -C "${.CURDIR}" build_${_v:H:S,/,,}_S
131.endif
132.endfor
133
134.for _v in ${VARIANTCOMBOS}
135# Variant suffix rules so the filenames are unique and Libsystem won't complain
136# because of ambiguities with -sectorder
137.SUFFIXES: -${_v}.o -${_v}.do -${_v}.po -${_v}.So
138.o-${_v}.o .do-${_v}.do .po-${_v}.po .So-${_v}.So:
139 mv ${.IMPSRC} ${.TARGET}
140
141# These are the build targets of the above $(BSDMAKE) calls, which just builds
142# using the standard rules, but with the additional flags.
143VARIANTOBJS+= ${${_v}SRCS:N*.h:R:S/$/-${_v}.o/g:S,^,${_v}/,g}
144build_${_v}: ${${_v}SRCS:N*.h:R:S/$/-${_v}.o/g}
145build_${_v}_D: ${${_v}SRCS:N*.h:R:S/$/-${_v}.do/g} ${${_v}SRCS2:N*.h:R:S/$/-${_v}.do/g}
146build_${_v}_P: ${${_v}SRCS:N*.h:R:S/$/-${_v}.po/g} ${${_v}SRCS2:N*.h:R:S/$/-${_v}.po/g}
147build_${_v}_S: ${${_v}SRCS:N*.h:R:S/$/-${_v}.So/g} ${${_v}SRCS2:N*.h:R:S/$/-${_v}.So/g}
148.endfor
149# These variables, plus VARIANTOBJS above, are the extra binaries that get
150# added to the .a files. Note that these objects are in subdirectories
151# of the main build directory.
152VARIANTDOBJS+= ${VARIANTOBJS:.o=.do}
153VARIANTPOBJS+= ${VARIANTOBJS:.o=.po}
154VARIANTSOBJS+= ${VARIANTOBJS:.o=.So}
155#### FreeBSD Rules ##################################################
156FBSDFLAGS= -I${.CURDIR}/fbsdcompat -include _fbsd_compat_.h
157
158-fbsd.c.o:
159 ${CC} -static ${FBSDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
160 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
161-fbsd.c.po:
162 ${CC} -pg -DPROFILE ${FBSDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
163 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
164-fbsd.c.So:
165 ${CC} ${FBSDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
166 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
167-fbsd.c.do:
168 ${CC} -g -DDEBUG ${FBSDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
169 -c ${.IMPSRC} -o ${.TARGET}
170
171#### NetBSD Rules ##################################################
172NBSDFLAGS= -I${.CURDIR}/nbsdcompat -include _nbsd_compat_.h
173
174-nbsd.c.o:
175 ${CC} -static ${NBSDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
176 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
177-nbsd.c.po:
178 ${CC} -pg -DPROFILE ${NBSDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
179 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
180-nbsd.c.So:
181 ${CC} ${NBSDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
182 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
183-nbsd.c.do:
184 ${CC} -g -DDEBUG ${NBSDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
185 -c ${.IMPSRC} -o ${.TARGET}
186
187#### OpenBSD Rules ##################################################
188OBSDFLAGS=
189
190-obsd.c.o:
191 ${CC} -static ${OBSDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
192 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
193-obsd.c.po:
194 ${CC} -pg -DPROFILE ${OBSDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
195 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
196-obsd.c.So:
197 ${CC} ${OBSDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
198 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
199-obsd.c.do:
200 ${CC} -g -DDEBUG ${OBSDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
201 -c ${.IMPSRC} -o ${.TARGET}
202
203#### UUID Rules ######################################################
204UUIDFLAGS= -I${.CURDIR}/uuid -include uuid-config.h
205
206-uuid.c.o:
207 ${CC} -static ${UUIDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
208 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
209-uuid.c.po:
210 ${CC} -pg -DPROFILE ${UUIDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
211 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
212-uuid.c.So:
213 ${CC} ${UUIDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
214 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
215-uuid.c.do:
216 ${CC} -g -DDEBUG ${UUIDFLAGS} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
217 -c ${.IMPSRC} -o ${.TARGET}
218.3-uuid.in.3:
219 sed -f ${.CURDIR}/uuid/uuidman.sed ${.IMPSRC} > ${.TARGET}
220
221#### Standard C Rules #################################################
222.c.o User.cUser.o Server.cServer.o:
223 ${CC} -static ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
224 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
225.c.po User.cUser.po Server.cServer.po:
226 ${CC} -pg -DPROFILE ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
227 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
228.c.So User.cUser.So Server.cServer.So:
229 ${CC} ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
230 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
231.c.do User.cUser.do Server.cServer.do:
232 ${CC} -g -DDEBUG ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
233 -c ${.IMPSRC} -o ${.TARGET}
234
235#### Standard Assembler Rules #########################################
236.s.o:
237 ${CC} -static -x assembler-with-cpp ${CFLAGS:M-[BIDF]*} \
238 ${CFLAGS-${.IMPSRC:T}:M-[BIDF]*} ${AINC} \
239 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
240.s.po:
241 ${CC} -pg -DPROFILE -x assembler-with-cpp ${CFLAGS:M-[BIDF]*} \
242 ${CFLAGS-${.IMPSRC:T}:M-[BIDF]*} ${AINC} \
243 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
244.s.So:
245 ${CC} -x assembler-with-cpp ${CFLAGS:M-[BIDF]*} \
246 ${CFLAGS-${.IMPSRC:T}:M-[BIDF]*} ${AINC} \
247 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
248.s.do:
249 ${CC} -g -DDEBUG -x assembler-with-cpp ${CFLAGS:M-[BIDF]*} \
250 ${CFLAGS-${.IMPSRC:T}:M-[BIDF]*} ${AINC} \
251 -c ${.IMPSRC} -o ${.TARGET}
252
253#### mig Rules ########################################################
254.defs.h .defsUser.c .defsServer.c:
255 mig -arch ${MACHINE_ARCH} -cc ${CC} -user ${.PREFIX}User.c -server ${.PREFIX}Server.c -header ${.PREFIX}.h ${.IMPSRC}
256
257gen_mig_defs: ${SRVMIGHDRS} ${MIGHDRS}
258gen_md_mig_defs: ${MD_MIGHDRS}
259
260#### Library Rules ####################################################
261lib${LIB}_static.a:: ${VARIANTCOMBOS} ${OBJS} ${STATICOBJS}
262 @${ECHO} building static ${LIB} library
263 @rm -f lib${LIB}_static.a
264 @${AR} cq lib${LIB}_static.a `lorder ${OBJS} ${STATICOBJS} ${VARIANTOBJS} | tsort -q` ${ARADD}
265 ${RANLIB} lib${LIB}_static.a
266
267lib${LIB}_profile.a:: ${VARIANTCOMBOS:S/$/_P/g} ${POBJS} ${POBJS2}
268 @${ECHO} building profiled ${LIB} library
269 @rm -f lib${LIB}_profile.a
270 @${AR} cq lib${LIB}_profile.a `lorder ${POBJS} ${VARIANTPOBJS} | tsort -q` ${ARADD}
271 ${RANLIB} lib${LIB}_profile.a
272.if (${MACHINE_ARCH} == ppc)
273 @${ECHO} building profiled ${LIB128} library
274 @rm -f lib${LIB128}_profile.a
275 @${AR} cq lib${LIB128}_profile.a ${LDBL_128_POBJS}
276.endif
277
278lib${LIB}_debug.a:: ${VARIANTCOMBOS:S/$/_D/g} ${DOBJS} ${DOBJS2}
279 @${ECHO} building debug ${LIB} library
280 @rm -f lib${LIB}_debug.a
281 @${AR} cq lib${LIB}_debug.a `lorder ${DOBJS} ${VARIANTDOBJS} | tsort -q` ${ARADD}
282 ${RANLIB} lib${LIB}_debug.a
283.if (${MACHINE_ARCH} == ppc)
284 @${ECHO} building debug ${LIB128} library
285 @rm -f lib${LIB128}_debug.a
286 @${AR} cq lib${LIB128}_debug.a ${LDBL_128_DOBJS}
287.endif
288
289lib${LIB}.a:: ${VARIANTCOMBOS:S/$/_S/g} ${SOBJS} ${SOBJS2}
290 @${ECHO} building standard ${LIB} library
291 @rm -f lib${LIB}.a
292 @${AR} cq lib${LIB}.a `lorder ${SOBJS} ${VARIANTSOBJS} | tsort -q` ${ARADD}
293 ${RANLIB} lib${LIB}.a
294.if (${MACHINE_ARCH} == ppc)
295 @${ECHO} building standard ${LIB128} library
296 @rm -f lib${LIB128}.a
297 @${AR} cq lib${LIB128}.a ${LDBL_128_SOBJS}
298.endif
299
300CLEANFILES += ${DOBJS} libc_static.a libc_profile.a libc_debug.a
301
302INCDIR = ${DESTDIR}/usr/include
303LOCINCDIR = ${DESTDIR}/usr/local/include
304SYSTEMFRAMEWORK = ${DESTDIR}/System/Library/Frameworks/System.framework
305PRIVHDRS = ${SYSTEMFRAMEWORK}/Versions/B/PrivateHeaders
306KERNELFRAMEWORK = ${DESTDIR}/System/Library/Frameworks/Kernel.framework
307PRIVKERNELHDRS = ${KERNELFRAMEWORK}/Versions/A/PrivateHeaders
308
309installhdrs-md: gen_md_mig_defs
310 mkdir -p ${INCDIR}/mach/${MACHINE_ARCH}
311 ${INSTALL} -c -m 444 ${MD_MIGHDRS} ${INCDIR}/mach/${MACHINE_ARCH}
312
313installhdrs: autopatchhdrs gen_mig_defs
314 mkdir -p ${INCDIR}/arpa
315 mkdir -p ${INCDIR}/libkern
316 mkdir -p ${INCDIR}/mach
317 mkdir -p ${INCDIR}/machine
318 mkdir -p ${INCDIR}/malloc
319 mkdir -p ${INCDIR}/objc
320 mkdir -p ${INCDIR}/protocols
321 mkdir -p ${INCDIR}/servers
322 mkdir -p ${INCDIR}/sys
323 mkdir -p ${INCDIR}/xlocale
324 ${INSTALL} -c -m 444 ${INSTHDRS} ${INCDIR}
325 ${INSTALL} -c -m 444 ${ARPA_INSTHDRS} ${INCDIR}/arpa
326 ${INSTALL} -c -m 444 ${LIBKERN_INSTHDRS} ${INCDIR}/libkern
327 ${INSTALL} -c -m 444 ${MACH_INSTHDRS} ${INCDIR}/mach
328 ${INSTALL} -c -m 444 ${MACHINE_INSTHDRS} ${INCDIR}/machine
329 ${INSTALL} -c -m 444 ${MALLOC_INSTHDRS} ${INCDIR}/malloc
330 ${INSTALL} -c -m 444 ${OBJC_INSTHDRS} ${INCDIR}/objc
331 ${INSTALL} -c -m 444 ${PROTO_INSTHDRS} ${INCDIR}/protocols
332 ${INSTALL} -c -m 444 ${SRVHDRS} ${INCDIR}/servers
333 ${INSTALL} -c -m 444 ${SYS_INSTHDRS} ${INCDIR}/sys
334 ${INSTALL} -c -m 444 ${XLOCALE_INSTHDRS} ${INCDIR}/xlocale
335 mkdir -p ${LOCINCDIR}
336 ${INSTALL} -c -m 444 ${LOCALHDRS} ${LOCINCDIR}
337 mkdir -p ${PRIVHDRS}/architecture/ppc
338 mkdir -p ${PRIVHDRS}/btree
339 mkdir -p ${PRIVHDRS}/machine
340 mkdir -p ${PRIVHDRS}/objc
341 mkdir -p ${PRIVHDRS}/uuid
342 mkdir -p ${PRIVHDRS}/sys
343 mkdir -p ${PRIVKERNELHDRS}/uuid
344 ${INSTALL} -c -m 444 ${PRIV_INSTHDRS} ${PRIVHDRS}
345 ${INSTALL} -c -m 444 ${SRCROOT}/ppc/sys/processor_facilities.h ${PRIVHDRS}/architecture/ppc
346 ${INSTALL} -c -m 444 ${SYMROOT}/btree.h ${PRIVHDRS}/btree
347 ${INSTALL} -c -m 444 ${SYMROOT}/bt_extern.h ${PRIVHDRS}/btree
348 ${INSTALL} -c -m 444 ${SRCROOT}/internat/NXCType.h ${PRIVHDRS}/objc
349 mv ${DESTDIR}/usr/include/asm.h ${PRIVHDRS}/machine
350 mv ${INCDIR}/servers/srvbootstrap.h ${INCDIR}/servers/bootstrap.h
351 @for i in `find ${DESTDIR}/usr/include/mach ${DESTDIR}/usr/include/servers -name \*.h`; do \
352 x=`fgrep '<mach/mig.h>' $$i | uniq -d`; \
353 if [ -n "$$x" ]; then \
354 echo patching $$i; \
355 ed - $$i < ${SRCROOT}/fixdups.ed; \
356 fi; \
357 done
358 ${INSTALL} -c -m 444 ${SYS_INSTHDRS} ${PRIVHDRS}/sys
359 ${INSTALL} -c -m 444 ${PRIVUUID_INSTHDRS} ${PRIVHDRS}/uuid
360 ${INSTALL} -c -m 444 ${PRIVUUID_INSTHDRS} ${PRIVKERNELHDRS}/uuid
361 ${INSTALL} -c -m 444 ${INSTHDRS_AUTOPATCH:S,^,${SYMROOT}/,} ${INCDIR}
362.for _h in ${STRIP_HDRS}
363 chmod u+w ${INCDIR}/${_h}
364 ed - ${INCDIR}/${_h} < ${.CURDIR}/strip-header.ed
365 chmod u-w ${INCDIR}/${_h}
366.endfor
367
368install_lib${LIB}_static.a:
369 ${INSTALL} -c -m 444 lib${LIB}_static.a ${DESTDIR}/usr/local/lib/system/
370install_lib${LIB}_profile.a:
371 ${INSTALL} -c -m 444 lib${LIB}_profile.a ${DESTDIR}/usr/local/lib/system
372install_lib${LIB}_debug.a:
373 ${INSTALL} -c -m 444 lib${LIB}_debug.a ${DESTDIR}/usr/local/lib/system/
374install_lib${LIB}.a:
375 ${INSTALL} -c -m 444 lib${LIB}.a ${DESTDIR}/usr/local/lib/system/
376
377autopatch: autopatchhdrs ${AUTOPATCHSRCS}
378autopatchhdrs: ${AUTOPATCHHDRS}
379autopatchman: ${AUTOPATCHMAN}
380
381clean:
382 rm -f ${OBJS} ${POBJS} ${DOBJS} ${SOBJS} ${CLEANFILES}
383 rm -f lib${LIB}.a lib${LIB}_static.a lib${LIB}_profile.a \
384 lib${LIB}_debug.a