xref: /netbsd-src/distrib/utils/libhack/Makefile (revision 69b6d498973bb4d7230c2d3c12bd9a032738ec8e)
1# $NetBSD: Makefile,v 1.18 2005/05/15 10:15:47 dsl Exp $
2#
3# Stubs to kill off some things from libc:
4# This save space on a boot system.
5# (See Makefile.inc also.)
6
7.PATH.c: ${.CURDIR}/../../../lib/libc/gen
8
9CPPFLAGS+=	-DSMALL
10
11LIB=		hack
12SRCS=		getcap.c getgrent.c getnet.c getnetgr.c getpwent.c \
13		localeconv.c perror.c setlocale.c \
14		mbrtowc.c \
15		strerror.c strsignal.c syslog.c utmp.c yplib.c
16
17WARNS=		1
18NOLINKLIB=	# defined
19NOLINT= 	# defined
20NOPIC=		# defined
21NOPROFILE=	# defined
22
23realall: libhack.o
24
25libhack.o: libhack.a
26	${LD} -r -o $@ --whole-archive libhack.a
27
28CLEANFILES+=	libhack.o
29
30tpwent: getpwent.c
31	${CC} -g -o $@.o -DTEST_MAIN -c getpwent.c
32	${CC} -o $@ $@.o
33
34.include <bsd.lib.mk>
35