1 1.3 tsutsui # $NetBSD: Makefile,v 1.3 2014/07/06 06:28:49 tsutsui Exp $ 2 1.1 tsutsui 3 1.1 tsutsui NOMAN= # defined 4 1.1 tsutsui 5 1.1 tsutsui .include <bsd.own.mk> 6 1.1 tsutsui 7 1.1 tsutsui BOOT= Netboot 8 1.1 tsutsui VERSIONFILE= ${.CURDIR}/version 9 1.1 tsutsui VERSION!= ${TOOL_AWK} -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } \ 10 1.1 tsutsui END { print it }' ${VERSIONFILE} 11 1.1 tsutsui NEWVERSWHAT= "${BOOT}" 12 1.1 tsutsui 13 1.1 tsutsui # text address 14 1.1 tsutsui TEXT= 006000 15 1.1 tsutsui 16 1.1 tsutsui # RTC offset 17 1.1 tsutsui RTC_OFFSET= -540 18 1.1 tsutsui 19 1.1 tsutsui PROG= netboot 20 1.1 tsutsui BINDIR= /usr/mdec 21 1.1 tsutsui BINMODE= 444 22 1.1 tsutsui STRIPFLAG= 23 1.1 tsutsui 24 1.1 tsutsui BFDNAME= a.out-m68k-netbsd 25 1.1 tsutsui STRIP?= /usr/bin/strip 26 1.1 tsutsui OBJCOPY?= /usr/bin/objcopy 27 1.1 tsutsui 28 1.1 tsutsui # XXX shared sources should be in COMMONDIR 29 1.1 tsutsui BOOTDIR= ${.CURDIR}/../boot 30 1.1 tsutsui .PATH: ${BOOTDIR} 31 1.1 tsutsui 32 1.1 tsutsui SRCS= srt0.S boot.c conf.c exec_image.S if_ne.c ne.c dp8390.c 33 1.1 tsutsui S= ${.CURDIR}/../../../.. 34 1.1 tsutsui M= ${.CURDIR}/../.. 35 1.1 tsutsui COMMONDIR= $M/stand/common 36 1.1 tsutsui .PATH: ${COMMONDIR} 37 1.1 tsutsui 38 1.1 tsutsui SRCS+= vers.c 39 1.1 tsutsui CLEANFILES+= vers.c 40 1.1 tsutsui vers.c: ${VERSIONFILE} 41 1.1 tsutsui ${_MKTARGET_CREATE} 42 1.1 tsutsui ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ 43 1.1 tsutsui ${.ALLSRC} ${MACHINE} ${NEWVERSWHAT} 44 1.1 tsutsui 45 1.1 tsutsui CPPFLAGS+= -nostdinc -I$S -I${.OBJDIR} -I$M/stand/libsa 46 1.1 tsutsui CPPFLAGS+= -I$M/stand/libiocs -I${COMMONDIR} 47 1.1 tsutsui CPPFLAGS+= -D_STANDALONE -DHEAP_VARIABLE 48 1.1 tsutsui CPPFLAGS+= -DTEXTADDR="0x${TEXT}" 49 1.1 tsutsui CPPFLAGS+= -DBOOT=\"${BOOT}\" -DBOOT_VERS=\"${VERSION}\" 50 1.3 tsutsui CPPFLAGS+= -DNETBOOT 51 1.1 tsutsui CPPFLAGS+= -DLIBSA_ENABLE_LS_OP 52 1.1 tsutsui CPPFLAGS+= -DRTC_OFFSET=${RTC_OFFSET} 53 1.1 tsutsui CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP 54 1.3 tsutsui #CPPFLAGS+= -DDEBUG 55 1.1 tsutsui CFLAGS= -Wno-main -Os -m68020-60 56 1.1 tsutsui LINKFLAGS= -N -static -T ${BOOTDIR}/boot.ldscript 57 1.1 tsutsui LIBIOCS!= cd $M/stand/libiocs && ${PRINTOBJDIR} 58 1.1 tsutsui LIBSA!= cd $M/stand/libsa && ${PRINTOBJDIR} 59 1.1 tsutsui L= ${LIBSA}/lib 60 1.1 tsutsui LDLIBS= ${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a 61 1.1 tsutsui LDLIBS+= ${LIBIOCS}/libiocs.a 62 1.1 tsutsui 63 1.1 tsutsui .include "../Makefile.booters" 64 1.1 tsutsui 65 1.1 tsutsui realall: ${PROG} 66 1.1 tsutsui ${PROG}: ${OBJS} ${LDLIBS} 67 1.1 tsutsui ${_MKTARGET_LINK} 68 1.1 tsutsui ${LD} ${LINKFLAGS} -o ${PROG}.sym ${OBJS} ${LDLIBS} 69 1.1 tsutsui ${STRIP} -F ${BFDNAME} -o ${PROG} ${PROG}.sym 70 1.1 tsutsui 71 1.1 tsutsui CLEANFILES+= ${PROG}.sym 72 1.1 tsutsui 73 1.1 tsutsui .include <bsd.prog.mk> 74