summaryrefslogtreecommitdiff
path: root/distrib/utils/libhack/Makefile
blob: 01de6b1ca26c9bba2609d1b843e4c4df582e1fa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# $NetBSD: Makefile,v 1.26 2019/03/28 15:04:41 christos Exp $
#
# Stubs to kill off some things from libc:
# This save space on a boot system.
# (See Makefile.inc also.)

LIB=	hack
WARNS=		1
NOLINKLIB=	# defined
NOLINT= 	# defined
NOPIC=		# defined
NOPROFILE=	# defined

HACKSRC?=${.CURDIR}
HACKOBJ?=${.OBJDIR}

.include "Makefile.inc"

OBJS=		${HACKOBJS}

realall: libhack.o

libhack.o: libhack.a
	${LD} -r -o $@ --whole-archive libhack.a

CLEANFILES+=	libhack.o

tpwent: getpwent.c
	${CC} -g -o $@.o -DTEST_MAIN -c getpwent.c
	${CC} -o $@ $@.o

.include <bsd.lib.mk>