NetBSD/distrib/utils/sysinst/Makefile.inc
lukem ed56ec3a05 Rework how SMALLPROG was being used and how INET6 support was enabled.
There's two variables added to Makefile.crunch:

    SMALLPROG		If 1, add SMALLPROG=1 to CRUNCHENV.  [default: 1]
			This can be used by various Makefiles to
			determine if a `small' version of the program
			is required.

    SMALLPROG_INET6	If 1 and SMALLPROG == 1, add SMALLPROG_INET6=1
			to CRUNCHENV.  [default: 0]
			This can be used by various Makefiles to
			determine if the `small' version has INET6
			support enabled.

Only enable SMALLPROG_INET6 for programs on the ramdisks that have INET6 in
the appropriate kernel, and cleanup INET6 setting.
(Note: this means that sysinst won't get INET6 support if the kernel
it's running on doesn't have it).

This change saves a fair bit of space on various install images
(including i386 ramdisk-{ps2,small,tiny}) that didn't have INET6 in
the kernel but were unconditionally getting INET6 support in their tools.
2002-10-17 02:05:35 +00:00

82 lines
1.6 KiB
Makefile

# $NetBSD: Makefile.inc,v 1.18 2002/10/17 02:05:37 lukem Exp $
#
# Makefile for install
PROG= sysinst
NOMAN= # defined
.include <bsd.own.mk> # for mk.conf
DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBUTIL}
LDADD= -lcurses -ltermcap -lutil
LDSTATIC?= -static
VERDEP= ${NETBSDSRCDIR}/sys/conf/osrelease.sh
VER!= sh ${VERDEP}
CPPFLAGS+= -I. -I${.CURDIR}/../.. -I${.CURDIR} \
-DREL=\"${VER}\" -DMACH=\"${MACHINE}\"
.if defined(SMALLPROG_INET6)
CPPFLAGS+=-DINET6
.endif
# Host to ftp from. Default:
# "ftp.netbsd.org"
#
.if defined(SYSINST_FTP_HOST)
CPPFLAGS+= -DSYSINST_FTP_HOST=\"${SYSINST_FTP_HOST}\"
.endif
# Top-level ftp directory. Default:
# "pub/NetBSD/NetBSD-" + VER + "/" + MACH
#
.if defined(SYSINST_FTP_DIR)
CPPFLAGS+= -DSYSINST_FTP_DIR=\"${SYSINST_FTP_DIR}\"
.endif
# Top-level CDROM directory. Default:
# "/" + MACH
#
.if defined(SYSINST_CDROM_DIR)
CPPFLAGS+= -DSYSINST_CDROM_DIR=\"${SYSINST_CDROM_DIR}\"
.endif
WARNS= 1
CLEANFILES= menu_defs.c menu_defs.h menus.def \
msg_defs.c msg_defs.h msg.def msgtouch
SYSINSTLANG?= en
.PATH: ${.CURDIR}/../..
MENUC?= menuc
MSGC?= msgc
.include <bsd.prog.mk>
menu_defs.c menu_defs.h: menus.def
${MENUC} menus.def
msg_defs.c msg_defs.h: msg.def
${MSGC} msg.def
# Needed to get proper dependency checks on osrelease
msgtouch: ${VERDEP}
touch ${.TARGET}
msg.def: msg.mi.${SYSINSTLANG} msg.md.${SYSINSTLANG} msgtouch
sed "s/@@VERSION@@/${VER}/" ${.ALLSRC} > ${.TARGET}
menus.def: menus.mi.${SYSINSTLANG} menus.md.${SYSINSTLANG} msgtouch
sed "s/@@VERSION@@/${VER}/" ${.ALLSRC} > ${.TARGET}
menu_defs.c: msg_defs.h
XOBJS:=${SRCS:M*.c:R:O:S/$/.o/g}
${XOBJS}: msg_defs.h menu_defs.h