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