Home | History | Annotate | Line # | Download | only in libkern
Makefile.inc revision 1.24.4.1
      1  1.24.4.1        is #	$NetBSD: Makefile.inc,v 1.24.4.1 1997/03/12 16:01:16 is Exp $
      2       1.1       cgd #
      3      1.24       cgd #	Configuration variables (default values are below):
      4      1.24       cgd #
      5      1.24       cgd #	S	must be set to the top of the 'sys' tree.
      6      1.24       cgd #	KERNDST	may be set to the location of the directory where library
      7      1.24       cgd #		objects are to be built.  Defaults to ${.OBJDIR}/lib/kern.
      8      1.24       cgd #	KERN_AS	may be set to 'obj' to build a object from the library's
      9      1.24       cgd #		object files.  (Otherwise, a library will be built.)
     10      1.24       cgd #		Defaults to 'library'.
     11  1.24.4.1        is #	KERNMISCCPPFLAGS
     12  1.24.4.1        is #		Miscellaneous cpp flags to be passed to the library's Makefile
     13  1.24.4.1        is #		when building.
     14      1.24       cgd #	KERNMISCMAKEFLAGS
     15      1.24       cgd #		Miscellaneous flags to be passed to the library's Makefile when
     16      1.24       cgd #		building.  See library's Makefile for more details about
     17      1.24       cgd #		supported flags and their default values.
     18       1.1       cgd 
     19      1.24       cgd # Default values:
     20      1.16   mycroft KERNDST?=	${.OBJDIR}/lib/kern
     21      1.22        ws KERN_AS?=	obj
     22      1.22        ws 
     23      1.24       cgd KERNDIR=	$S/lib/libkern
     24      1.24       cgd .if (${KERN_AS} == "obj")
     25      1.24       cgd KERNLIB=	${KERNDST}/libkern.o
     26      1.24       cgd KERNLIB_PROF=	${KERNDST}/libkern.po
     27      1.24       cgd .else
     28      1.22        ws KERNLIB=	${KERNDST}/libkern.a
     29      1.22        ws KERNLIB_PROF=	${KERNDST}/libkern_p.a
     30      1.22        ws .endif
     31       1.1       cgd 
     32      1.13   mycroft KERNMAKE= \
     33      1.16   mycroft 	cd ${KERNDIR} && MAKEOBJDIR=${KERNDST} ${MAKE} \
     34      1.23  christos 	    CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
     35      1.23  christos 	    AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
     36      1.23  christos 	    LD=${LD:Q} STRIP=${STRIP:Q} \
     37      1.23  christos 	    MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
     38      1.24       cgd 	    KERNCPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:Q} \
     39  1.24.4.1        is 	    KERNMISCCPPFLAGS=${KERNMISCCPPFLAGS:Q} \
     40      1.24       cgd 	    ${KERNMISCMAKEFLAGS}
     41      1.13   mycroft 
     42      1.10  christos ${KERNLIB}:		.NOTMAIN __always_make_kernlib
     43       1.1       cgd 	@echo making sure the kern library is up to date...
     44      1.22        ws .if (${KERN_AS} == "library")
     45      1.22        ws 	@${KERNMAKE} libkern.a
     46      1.22        ws .else
     47      1.13   mycroft 	@${KERNMAKE} libkern.o
     48      1.22        ws .endif
     49       1.1       cgd 
     50      1.10  christos ${KERNLIB_PROF}:	.NOTMAIN __always_make_kernlib
     51       1.1       cgd 	@echo making sure the profiled kern library is up to date...
     52      1.22        ws .if (${KERN_AS} == "library")
     53      1.22        ws 	@${KERNMAKE} libkern_p.a
     54      1.22        ws .else
     55      1.13   mycroft 	@${KERNMAKE} libkern.po
     56      1.22        ws .endif
     57      1.10  christos 
     58      1.24       cgd clean:			.NOTMAIN cleankernlib
     59      1.24       cgd cleankernlib:		.NOTMAIN __always_make_kernlib
     60      1.10  christos 	@echo cleaning the kern library objects
     61      1.13   mycroft 	@${KERNMAKE} clean
     62      1.14   mycroft 
     63      1.24       cgd cleandir:		.NOTMAIN cleandirkernlib
     64      1.24       cgd cleandirkernlib:	.NOTMAIN __always_make_kernlib
     65      1.24       cgd 	@echo cleandiring the kern library objects
     66      1.24       cgd 	@${KERNMAKE} cleandir
     67      1.24       cgd 
     68      1.24       cgd depend:			.NOTMAIN dependkernlib
     69      1.24       cgd dependkernlib:		.NOTMAIN __always_make_kernlib
     70      1.14   mycroft 	@echo depending the kern library objects
     71      1.14   mycroft 	@${KERNMAKE} depend
     72       1.1       cgd 
     73       1.2       cgd __always_make_kernlib:	.NOTMAIN
     74  1.24.4.1        is 	@(mkdir -p ${KERNDST})
     75