Home | History | Annotate | Line # | Download | only in libefi
Makefile.inc revision 1.3
      1 #	$NetBSD: Makefile.inc,v 1.3 2015/09/06 15:34:55 uebayasi Exp $
      2 #
      3 #	Configuration variables (default values are below):
      4 #
      5 #	S	must be set to the top of the 'sys' tree.
      6 #	EFIDST	may be set to the location of the directory where library
      7 #		objects are to be built.  Defaults to ${.OBJDIR}/lib/efi.
      8 #	EFIMISCCPPFLAGS
      9 #		Miscellaneous cpp flags to be passed to the library's Makefile
     10 #		when building.
     11 #	EFIMISCMAKEFLAGS
     12 #		Miscellaneous flags to be passed to the library's Makefile when
     13 #		building.  See library's Makefile for more details about
     14 #		supported flags and their default values.
     15 
     16 # Default values:
     17 EFIDST?=		${.OBJDIR}/efi/libefi
     18 
     19 EFIDIR?=		$S/arch/ia64/stand/efi/libefi
     20 EFILIB=			${EFIDST}/libefi.a
     21 
     22 EFIMAKE= \
     23 	cd ${EFIDIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \
     24 	    MAKEOBJDIR=${EFIDST} ${MAKE} \
     25 	    CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
     26 	    AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
     27 	    LD=${LD:Q} STRIP=${STRIP:Q} \
     28 	    MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
     29 	    EFICPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:Q} \
     30 	    EFIMISCCPPFLAGS=${EFIMISCCPPFLAGS:Q} \
     31 	    ${EFIMISCMAKEFLAGS}
     32 
     33 ${EFILIB}:		.NOTMAIN __always_make_efilib
     34 	@echo making sure the efi library is up to date...
     35 	@${EFIMAKE} libefi.a
     36 	@echo done
     37 
     38 clean:			.NOTMAIN cleanefilib
     39 cleanefilib:		.NOTMAIN
     40 	@echo cleaning the efi library objects
     41 	@if [ -d "${EFIDST}" ]; then ${EFIMAKE} clean; fi
     42 	@echo done
     43 
     44 cleandir distclean:	.NOTMAIN cleandirefilib
     45 cleandirefilib:		.NOTMAIN
     46 	@echo cleandiring the efi library objects
     47 	@if [ -d "${EFIDST}" ]; then ${EFIMAKE} cleandir; fi
     48 	-rm -rf efi
     49 	@echo done
     50 
     51 dependall depend:	.NOTMAIN dependefilib
     52 dependefilib:		.NOTMAIN __always_make_efilib
     53 	@echo depending the efi library objects
     54 	@${EFIMAKE} depend
     55 	@echo done
     56 
     57 __always_make_efilib:	.NOTMAIN
     58 	@mkdir -p ${EFIDST}
     59