Makefile.inc revision 1.26.8.1 1 # $NetBSD: Makefile.inc,v 1.26.8.1 2017/07/04 12:57:45 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 CPPFLAGS+= -DSMALL
20 CPPFLAGS+= -DLIBHACK
21 HACKOBJS+= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o \
22 localeconv.o multibyte.o perror.o runetable.o setlocale.o \
23 strerror.o strsignal.o syslog.o utmp.o yplib.o
24
25 CPPFLAGS.runetable.c+= -I${HACKSRC}/../../../lib/libc/citrus \
26 -DALL_80_TO_FF_SW1
27
28 CPPFLAGS.syslog.c+= -I${HACKSRC}/../../../lib/libc/include
29 CPPFLAGS.gethost.c+= -I${HACKSRC}/../../../lib/libc/net
30
31 libhack.o: ${HACKOBJS}
32 ${LD} -r -o $@ ${.ALLSRC}
33
34
35 .if 1
36 .PATH.c: ${HACKSRC} ${HACKSRC}/../../../lib/libc/gen ${HACKSRC}/../../../lib/libc/locale
37 .else
38 # XXX .PATH won't work here, because of crunchgen used by various builds
39 getcap.o: ${HACKSRC}/../../../lib/libc/gen/getcap.c
40 getgrent.o: ${HACKSRC}/getgrent.c
41 gethost.o: ${HACKSRC}/gethost.c
42 getnet.o: ${HACKSRC}/getnet.c
43 getnetgr.o: ${HACKSRC}/getnetgr.c
44 getpwent.o: ${HACKSRC}/getpwent.c
45 localeconv.o: ${HACKSRC}/localeconv.c
46 multibyte.o: ${HACKSRC}/multibyte.c
47 perror.o: ${HACKSRC}/perror.c
48 runetable.o: ${HACKSRC}/../../../lib/libc/locale/runetable.c
49 setlocale.o: ${HACKSRC}/setlocale.c
50 strerror.o: ${HACKSRC}/strerror.c
51 strsignal.o: ${HACKSRC}/strsignal.c
52 syslog.o: ${HACKSRC}/syslog.c
53 utmp.o: ${HACKSRC}/utmp.c
54 yplib.o: ${HACKSRC}/yplib.c
55 .endif
56