Home | History | Annotate | Line # | Download | only in libhack
Makefile.inc revision 1.31
      1 # $NetBSD: Makefile.inc,v 1.31 2019/07/28 10:21:18 martin Exp $
      2 #
      3 # Include this fragment to build libhack.o
      4 # It is .o and not .a to make sure these are the
      5 # objects you get (and not the ones in libc.a)
      6 #
      7 
      8 #
      9 # Required variables:
     10 #	HACKSRC		This directory
     11 #
     12 # Optional variables:
     13 #	HACKOBJS	Extra objects to build.
     14 #			The following extra objects are available:
     15 #			gethost.o	cut-down gethostby{name,addr}()
     16 #					that only supports /etc/hosts
     17 #
     18 
     19 .include <bsd.own.mk>
     20 
     21 CPPFLAGS+=	-DSMALL
     22 CPPFLAGS+=	-DLIBHACK
     23 HACKOBJS+=	getcap.o getgrent.o getnet.o getnetgr.o getpwent.o jemalloc.o \
     24 		localeconv.o multibyte.o perror.o runetable.o setlocale.o \
     25 		nl_langinfo.o strcasecmp.o \
     26 		strerror.o strsignal.o syslog.o utmp.o fmtcheck.o
     27 
     28 .if (${USE_YP} != "no")
     29 HACKOBJS+=	yplib.o
     30 .endif
     31 
     32 CPPFLAGS.runetable.c+= -I${HACKSRC}/../../../lib/libc/citrus \
     33 			-DALL_80_TO_FF_SW1
     34 
     35 CPPFLAGS.syslog.c+= -I${HACKSRC}/../../../lib/libc/include
     36 CPPFLAGS.jemalloc.c+= -I${HACKSRC}/../../../lib/libc/include
     37 CPPFLAGS.gethost.c+= -I${HACKSRC}/../../../lib/libc/net
     38 
     39 .if !defined(LIB)
     40 libhack.o: ${HACKOBJS}
     41 	${LD} -r -o $@ ${.ALLSRC}
     42 .endif
     43 
     44 .if 1
     45 .PATH.c: \
     46 	${HACKSRC} \
     47 	${HACKSRC}/../../../lib/libc/gen \
     48 	${HACKSRC}/../../../lib/libc/locale \
     49 	${HACKSRC}/../../../lib/libc/stdlib
     50 .else
     51 # XXX .PATH won't work here, because of crunchgen used by various builds
     52 getcap.o:	${HACKSRC}/../../../lib/libc/gen/getcap.c
     53 getgrent.o:	${HACKSRC}/getgrent.c
     54 gethost.o:	${HACKSRC}/gethost.c
     55 getnet.o:	${HACKSRC}/getnet.c
     56 getnetgr.o:	${HACKSRC}/getnetgr.c
     57 getpwent.o:	${HACKSRC}/getpwent.c
     58 localeconv.o:	${HACKSRC}/localeconv.c
     59 multibyte.o:	${HACKSRC}/multibyte.c
     60 perror.o:	${HACKSRC}/perror.c
     61 jemalloc.o:	${HACKSRC}/../../../lib/libc/stdlib/jemalloc.c
     62 runetable.o:	${HACKSRC}/../../../lib/libc/locale/runetable.c
     63 setlocale.o:	${HACKSRC}/setlocale.c
     64 strerror.o:	${HACKSRC}/strerror.c
     65 strsignal.o:	${HACKSRC}/strsignal.c
     66 syslog.o:	${HACKSRC}/syslog.c
     67 utmp.o:		${HACKSRC}/utmp.c
     68 .if (${USE_YP} != "no")
     69 yplib.o:	${HACKSRC}/yplib.c
     70 .endif
     71 .endif
     72