Makefile revision 1.14
1# $NetBSD: Makefile,v 1.14 2014/01/12 15:26:30 tsutsui Exp $ 2 3S= ${.CURDIR}/../../../.. 4 5PROG= altboot 6FILES+= ${PROG}.bin ${PROG}.img 7NOMAN= # defined 8SRCS= entry.S main.c brdsetup.c pci.c devopen.c dev_net.c memfs.c 9SRCS+= nif.c fxp.c tlp.c rge.c skg.c stg.c 10SRCS+= dsk.c pciide.c siisata.c 11SRCS+= exception.c vers.c 12CLEANFILES+= vers.c ${PROG} ${PROG}.bin ${PROG}.img 13CFLAGS+= -Wall -Wno-main -ffreestanding -msoft-float -mmultiple 14CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 15CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP -DLIBSA_PRINTF_WIDTH_SUPPORT 16#CPPFLAGS+= -DCONSNAME=\"com\" -DCONSPORT=0x3f8 -DCONSSPEED=115200 17#CPPFLAGS+= -DCONSNAME=\"eumb\" -DCONSPORT=0x4600 -DCONSSPEED=57600 18CPPFLAGS+= -nostdinc -I. -I${.OBJDIR} -I${S} 19DBG= -Os 20 21.include <bsd.own.mk> 22.include <bsd.klinks.mk> 23 24# XXX SHOULD NOT NEED TO DEFINE THESE! 25LIBCRT0= 26LIBCRTI= 27LIBC= 28LIBCRTBEGIN= 29LIBCRTEND= 30 31STRIPFLAG= 32BINMODE= 444 33 34RELOC= 1000000 35ENTRY= _start 36 37### find out what to use for libkern 38KERN_AS= library 39.include "${S}/lib/libkern/Makefile.inc" 40LIBKERN= ${KERNLIB} 41 42### find out what to use for libz 43Z_AS= library 44.include "${S}/lib/libz/Makefile.inc" 45LIBZ= ${ZLIB} 46 47### find out what to use for libsa 48SA_AS= library 49SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 50.include "${S}/lib/libsa/Makefile.inc" 51LIBSA= ${SALIB} 52 53.PHONY: vers.c 54vers.c: version 55 ${HOST_SH} ${S}/conf/newvers_stand.sh -K \ 56 ${${MKREPRO} == "yes" :?:-D} ${.CURDIR}/version "sandpoint" 57 58${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 59 ${_MKTARGET_LINK} 60 ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \ 61 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 62 ${OBJCOPY} -S -O binary ${PROG} ${PROG}.bin 63 ${TOOL_MKUBOOTIMAGE} -A powerpc -T kernel -C none -O linux \ 64 -a 0x${RELOC} -n ${PROG} ${PROG}.bin ${PROG}.img 65 66.include <bsd.prog.mk> 67