1 1.10.2.1 yamt # $NetBSD: defs.mk.in,v 1.10.2.1 2013/01/16 05:34:03 yamt Exp $ 2 1.10.2.1 yamt # 3 1.10.2.1 yamt # Makefile fragment for building with libnbcompat and associated 4 1.10.2.1 yamt # include files. It can also be used for building just with 5 1.10.2.1 yamt # the include files, without the library. 6 1.10.2.1 yamt # 7 1.10.2.1 yamt # This can be used when the library and include files have been installed 8 1.10.2.1 yamt # into TOOLDIR (by "make install" in the src/tools/compat directory), 9 1.10.2.1 yamt # or when they have not been installed into TOOLDIR but reside 10 1.10.2.1 yamt # in the .OBJDIR associated with src/tools/compat. 11 1.10.2.1 yamt # 12 1.10.2.1 yamt # Variables: 13 1.10.2.1 yamt # 14 1.10.2.1 yamt # COMPATLIB_UNINSTALLED: 15 1.10.2.1 yamt # If "yes", then use the files from the .OBJDIR of 16 1.10.2.1 yamt # NETBSDSRCDIR/tools/compat. Otherwise, use the files 17 1.10.2.1 yamt # from TOOLDIR. 18 1.10.2.1 yamt # 19 1.10.2.1 yamt # COMPATLIB_NO_LIB: 20 1.10.2.1 yamt # If "yes" then do not use the library (but still use 21 1.10.2.1 yamt # the include files). 22 1.10.2.1 yamt # 23 1.10.2.1 yamt # Examples: 24 1.10.2.1 yamt # 25 1.10.2.1 yamt # * Use uninstalled copy of libnbcompat and associated *.h files: 26 1.10.2.1 yamt # 27 1.10.2.1 yamt # COMPATLIB_UNINSTALLED= yes 28 1.10.2.1 yamt # COMPATOBJ!= cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR} 29 1.10.2.1 yamt # .-include "${COMPATOBJ}/defs.mk" 30 1.10.2.1 yamt # 31 1.10.2.1 yamt # * Use TOOLDIR copy of libnbcompat and associated *.h files: 32 1.10.2.1 yamt # 33 1.10.2.1 yamt # .-include "${TOOLDIR}/share/compat/defs.mk" 34 1.10.2.1 yamt # 35 1.10.2.1 yamt # * Use TOOLDIR copy of compat *.h files, but do not use libnbcompat.a: 36 1.10.2.1 yamt # 37 1.10.2.1 yamt # COMPATLIB_NO_LIB= yes 38 1.10.2.1 yamt # .-include "${TOOLDIR}/share/compat/defs.mk" 39 1.10.2.1 yamt # 40 1.10.2.1 yamt # The use of ".-include" instead of ".include" above is because it's 41 1.10.2.1 yamt # expected that the file might not exist during "make obj" or "make clean". 42 1.10.2.1 yamt # 43 1.10.2.1 yamt 44 1.10.2.1 yamt .include <bsd.own.mk> 45 1.10.2.1 yamt 46 1.10.2.1 yamt # Use the installed (TOOLDIR) version of the library and headers by default 47 1.10.2.1 yamt COMPATLIB_UNINSTALLED ?= no 48 1.10.2.1 yamt # Use library and includes by default. 49 1.10.2.1 yamt COMPATLIB_NO_LIB ?= no 50 1.10.2.1 yamt 51 1.10.2.1 yamt .if "${COMPATLIB_UNINSTALLED}" == "yes" 52 1.10.2.1 yamt # The library lives in the .OBJDIR. 53 1.10.2.1 yamt # 54 1.10.2.1 yamt # Some include files live directly in the .OBJDIR, while others 55 1.10.2.1 yamt # live in subdirectories of .OBJDIR/include. 56 1.10.2.1 yamt # 57 1.3 tv COMPATOBJ:= ${.PARSEDIR} 58 1.10.2.1 yamt COMPATLIBDIR= ${COMPATOBJ} 59 1.10.2.1 yamt COMPATINCFLAGS= -I${COMPATOBJ} -I${COMPATOBJ}/include 60 1.10.2.1 yamt .else 61 1.10.2.1 yamt # The library lives in TOOLDIR/lib. 62 1.10.2.1 yamt # 63 1.10.2.1 yamt # All include files live in TOOLDIR/include/comnpat, and its subdirectories. 64 1.10.2.1 yamt # 65 1.10.2.1 yamt COMPATLIBDIR= ${TOOLDIR}/lib 66 1.10.2.1 yamt COMPATINCFLAGS= -I${TOOLDIR}/include/compat 67 1.10.2.1 yamt .endif 68 1.5 thorpej 69 1.10.2.1 yamt HOSTEXEEXT= @EXEEXT@ 70 1.5 thorpej HOST_BSHELL= @BSHELL@ 71 1.6 thorpej 72 1.6 thorpej BUILD_OSTYPE!= uname -s 73 1.6 thorpej 74 1.6 thorpej # Disable use of pre-compiled headers on Darwin. 75 1.6 thorpej .if ${BUILD_OSTYPE} == "Darwin" 76 1.6 thorpej HOST_CPPFLAGS+= -no-cpp-precomp 77 1.6 thorpej .endif 78 1.3 tv 79 1.10.2.1 yamt HOST_CPPFLAGS+= ${COMPATINCFLAGS} -I${NETBSDSRCDIR}/tools/compat \ 80 1.10.2.1 yamt -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 81 1.3 tv 82 1.10.2.1 yamt .if "${COMPATLIB_NO_LIB}" != "yes" 83 1.10.2.1 yamt DPADD+= ${COMPATLIBDIR}/libnbcompat.a 84 1.10.2.1 yamt LDADD+= -L${COMPATLIBDIR} -lnbcompat @LIBS@ 85 1.10.2.1 yamt .endif # ! COMPATLIB_NO_LIB 86 1.10 apb 87 1.10 apb HAVE_PTHREAD_H= @HAVE_PTHREAD_H@ 88