xref: /openbsd/sys/lib/libsa/Makefile.inc (revision 404b540a)
1#	$OpenBSD: Makefile.inc,v 1.12 2003/06/01 17:00:32 deraadt Exp $
2#	$NetBSD: Makefile.inc,v 1.5 1996/09/30 16:01:18 ws Exp $
3#
4#	NOTE: $S must correspond to the top of the 'sys' tree
5SADIR=	$S/lib/libsa
6
7SADST?=	lib/sa
8SAREL?=	../../
9SALIB?=	${SADST}/libsa.a
10
11SAMAKE= \
12	cd ${SADST} && ${MAKE} -f ${SAREL}${SADIR}/Makefile \
13	  CC="${CC}" XCFLAGS="${CFLAGS}" \
14	  AS='${AS}' XAFLAGS='${AFLAGS}' \
15	  LD='${LD}' \
16	  XCPPFLAGS="${CPPFLAGS}" \
17	  SAREL="${SAREL}" \
18	  SADIR="${SADIR}" \
19	  EXTRACFLAGS="${EXTRACFLAGS}"
20.if defined(NO_NET)
21SAMAKE+= NO_NET=""
22.endif
23.if defined(SA_ZLIB)
24SAMAKE+= SA_ZLIB=""
25.endif
26.if defined(USE_LOADFILE)
27SAMAKE+= USE_LOADFILE=""
28.endif
29
30${SALIB}:		.NOTMAIN __always_make_salib
31	@echo making sure the stand-alone library is up to date...
32	@${SAMAKE} libsa.a
33
34clean::			.NOTMAIN __always_make_salib
35	@echo cleaning the stand-alone library objects
36	@${SAMAKE} clean
37	-rmdir -p ${SADST}
38
39depend::		.NOTMAIN __always_make_salib
40	@echo depending the standalone library objects
41	@${SAMAKE} depend
42
43__always_make_salib:	.NOTMAIN
44	-mkdir -p ${SADST}
45
46