Makefile.inc revision 1.29 1 # $NetBSD: Makefile.inc,v 1.29 2019/05/09 08:20:35 roy 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 strerror.o strsignal.o syslog.o utmp.o
26
27 .if (${USE_YP} != "no")
28 HACKOBJS+= yplib.o
29 .endif
30
31 CPPFLAGS.runetable.c+= -I${HACKSRC}/../../../lib/libc/citrus \
32 -DALL_80_TO_FF_SW1
33
34 CPPFLAGS.syslog.c+= -I${HACKSRC}/../../../lib/libc/include
35 CPPFLAGS.jemalloc.c+= -I${HACKSRC}/../../../lib/libc/include
36 CPPFLAGS.gethost.c+= -I${HACKSRC}/../../../lib/libc/net
37
38 .if !defined(LIB)
39 libhack.o: ${HACKOBJS}
40 ${LD} -r -o $@ ${.ALLSRC}
41 .endif
42
43 .if 1
44 .PATH.c: \
45 ${HACKSRC} \
46 ${HACKSRC}/../../../lib/libc/gen \
47 ${HACKSRC}/../../../lib/libc/locale \
48 ${HACKSRC}/../../../lib/libc/stdlib
49 .else
50 # XXX .PATH won't work here, because of crunchgen used by various builds
51 getcap.o: ${HACKSRC}/../../../lib/libc/gen/getcap.c
52 getgrent.o: ${HACKSRC}/getgrent.c
53 gethost.o: ${HACKSRC}/gethost.c
54 getnet.o: ${HACKSRC}/getnet.c
55 getnetgr.o: ${HACKSRC}/getnetgr.c
56 getpwent.o: ${HACKSRC}/getpwent.c
57 localeconv.o: ${HACKSRC}/localeconv.c
58 multibyte.o: ${HACKSRC}/multibyte.c
59 perror.o: ${HACKSRC}/perror.c
60 jemalloc.o: ${HACKSRC}/../../../lib/libc/stdlib/jemalloc.c
61 runetable.o: ${HACKSRC}/../../../lib/libc/locale/runetable.c
62 setlocale.o: ${HACKSRC}/setlocale.c
63 strerror.o: ${HACKSRC}/strerror.c
64 strsignal.o: ${HACKSRC}/strsignal.c
65 syslog.o: ${HACKSRC}/syslog.c
66 utmp.o: ${HACKSRC}/utmp.c
67 .if (${USE_YP} != "no")
68 yplib.o: ${HACKSRC}/yplib.c
69 .endif
70 .endif
71