1 1.27.6.2 martin # $NetBSD: Makefile.inc,v 1.27.6.3 2020/04/21 18:41:54 martin Exp $ 2 1.15 lukem # 3 1.1 gwr # Include this fragment to build libhack.o 4 1.1 gwr # It is .o and not .a to make sure these are the 5 1.1 gwr # objects you get (and not the ones in libc.a) 6 1.15 lukem # 7 1.1 gwr 8 1.15 lukem # 9 1.15 lukem # Required variables: 10 1.15 lukem # HACKSRC This directory 11 1.15 lukem # 12 1.15 lukem # Optional variables: 13 1.15 lukem # HACKOBJS Extra objects to build. 14 1.15 lukem # The following extra objects are available: 15 1.15 lukem # gethost.o cut-down gethostby{name,addr}() 16 1.15 lukem # that only supports /etc/hosts 17 1.15 lukem # 18 1.15 lukem 19 1.27.6.1 christos .include <bsd.own.mk> 20 1.27.6.1 christos 21 1.17 christos CPPFLAGS+= -DSMALL 22 1.27 manu CPPFLAGS+= -DLIBHACK 23 1.27.6.2 martin 24 1.27.6.1 christos HACKOBJS+= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o jemalloc.o \ 25 1.22 martin localeconv.o multibyte.o perror.o runetable.o setlocale.o \ 26 1.27.6.2 martin nl_langinfo.o strcasecmp.o \ 27 1.27.6.3 martin strerror.o strsignal.o syslog.o utmp.o fmtcheck.o \ 28 1.27.6.3 martin aligned_alloc.o 29 1.27.6.1 christos 30 1.27.6.1 christos .if (${USE_YP} != "no") 31 1.27.6.1 christos HACKOBJS+= yplib.o 32 1.27.6.1 christos .endif 33 1.1 gwr 34 1.27.6.2 martin .if ${HACK_CURSES:Uno} == "yes" 35 1.27.6.2 martin CURSES_SRC!= cd ${HACKSRC}/../../../lib/libcurses && \ 36 1.27.6.2 martin ${MAKE} DISABLE_WCHAR=yes -v SRCS 37 1.27.6.2 martin 38 1.27.6.2 martin .for s in ${CURSES_SRC} 39 1.27.6.2 martin CPPFLAGS.${s}+= -DDISABLE_WCHAR -DSMALL \ 40 1.27.6.2 martin -I${HACKSRC}/../../../lib/libcurses \ 41 1.27.6.2 martin -I${HACKSRC}/../../../lib/libterminfo 42 1.27.6.2 martin HACKOBJS+= ${s:S/.c/.o/} 43 1.27.6.2 martin ${s:S/.c/.o/}: ${HACKSRC}/../../../lib/libcurses/${s} 44 1.27.6.2 martin .endfor 45 1.27.6.2 martin 46 1.27.6.2 martin TERMINFO_SRC!= cd ${HACKSRC}/../../../lib/libterminfo && \ 47 1.27.6.2 martin ${MAKE} SMALLPROG=1 -v SRCS 48 1.27.6.2 martin TERMINFO_PATH!= cd ${HACKSRC}/../../../lib/libterminfo && \ 49 1.27.6.2 martin ${MAKE} -v .OBJDIR 50 1.27.6.2 martin 51 1.27.6.2 martin .for s in ${TERMINFO_SRC} 52 1.27.6.2 martin CPPFLAGS.${s}+= -DDISABLE_WCHAR -DSMALL \ 53 1.27.6.2 martin -I${HACKSRC}/../../../lib/libterminfo \ 54 1.27.6.2 martin -I${TERMINFO_PATH} 55 1.27.6.2 martin HACKOBJS+= ${s:S/.c/.o/} 56 1.27.6.2 martin .if ${s:Mhash*} != "" 57 1.27.6.2 martin ${s:S/.c/.o/}: ${TERMINFO_PATH}/${s} 58 1.27.6.2 martin .else 59 1.27.6.2 martin ${s:S/.c/.o/}: ${HACKSRC}/../../../lib/libterminfo/${s} 60 1.27.6.2 martin .endif 61 1.27.6.2 martin .endfor 62 1.27.6.2 martin .endif 63 1.27.6.2 martin 64 1.23 tnozaki CPPFLAGS.runetable.c+= -I${HACKSRC}/../../../lib/libc/citrus \ 65 1.23 tnozaki -DALL_80_TO_FF_SW1 66 1.22 martin 67 1.24 christos CPPFLAGS.syslog.c+= -I${HACKSRC}/../../../lib/libc/include 68 1.27.6.1 christos CPPFLAGS.jemalloc.c+= -I${HACKSRC}/../../../lib/libc/include 69 1.25 christos CPPFLAGS.gethost.c+= -I${HACKSRC}/../../../lib/libc/net 70 1.24 christos 71 1.27.6.1 christos .if !defined(LIB) 72 1.15 lukem libhack.o: ${HACKOBJS} 73 1.26 christos ${LD} -r -o $@ ${.ALLSRC} 74 1.27.6.1 christos .endif 75 1.2 gwr 76 1.26 christos .if 1 77 1.27.6.1 christos .PATH.c: \ 78 1.27.6.1 christos ${HACKSRC} \ 79 1.27.6.1 christos ${HACKSRC}/../../../lib/libc/gen \ 80 1.27.6.1 christos ${HACKSRC}/../../../lib/libc/locale \ 81 1.27.6.1 christos ${HACKSRC}/../../../lib/libc/stdlib 82 1.26 christos .else 83 1.15 lukem # XXX .PATH won't work here, because of crunchgen used by various builds 84 1.17 christos getcap.o: ${HACKSRC}/../../../lib/libc/gen/getcap.c 85 1.15 lukem getgrent.o: ${HACKSRC}/getgrent.c 86 1.15 lukem gethost.o: ${HACKSRC}/gethost.c 87 1.15 lukem getnet.o: ${HACKSRC}/getnet.c 88 1.15 lukem getnetgr.o: ${HACKSRC}/getnetgr.c 89 1.15 lukem getpwent.o: ${HACKSRC}/getpwent.c 90 1.15 lukem localeconv.o: ${HACKSRC}/localeconv.c 91 1.21 christos multibyte.o: ${HACKSRC}/multibyte.c 92 1.15 lukem perror.o: ${HACKSRC}/perror.c 93 1.27.6.1 christos jemalloc.o: ${HACKSRC}/../../../lib/libc/stdlib/jemalloc.c 94 1.27.6.3 martin aligned_alloc.o: ${HACKSRC}/../../../lib/libc/stdlib/aligned_alloc.c 95 1.22 martin runetable.o: ${HACKSRC}/../../../lib/libc/locale/runetable.c 96 1.15 lukem setlocale.o: ${HACKSRC}/setlocale.c 97 1.15 lukem strerror.o: ${HACKSRC}/strerror.c 98 1.15 lukem strsignal.o: ${HACKSRC}/strsignal.c 99 1.18 christos syslog.o: ${HACKSRC}/syslog.c 100 1.15 lukem utmp.o: ${HACKSRC}/utmp.c 101 1.27.6.1 christos .if (${USE_YP} != "no") 102 1.15 lukem yplib.o: ${HACKSRC}/yplib.c 103 1.26 christos .endif 104 1.27.6.1 christos .endif 105