Makefile revision 1.6
1# $NetBSD: Makefile,v 1.6 2003/10/26 07:25:36 lukem Exp $ 2.include <bsd.own.mk> 3 4ROMICE?= no 5 6S= ${.CURDIR}/../../../../ 7 8PROG= lcboot.out 9SREC= lcboot.srec 10MKMAN= no 11WARNS= 1 12SRCS= start.S main.c com.c conf.c dev_flash.c dev_net.c \ 13 devopen.c i28f128.c if_cs.c 14 15#CPPFLAGS+= -DDEBUG -DNET_DEBUG -DNETIF_DEBUG -DARP_DEBUG \ 16# -DETHER_DEBUG -DBOOTP_DEBUG 17 18STARTOBJS= 19 20NEWVERSWHAT= "L-Card+ Boot" 21VERSIONFILE= ${S}/arch/hpcmips/stand/lcboot/version 22 23 24# Make sure we override any optimization options specified by the user. 25#COPTS= -Os 26COPTS= 27DBG= 28 29AFLAGS+= -D_LOCORE -D_KERNEL 30AFLAGS+= -x assembler-with-cpp -traditional-cpp -mips2 -mno-abicalls 31INCLUDES= -I${.OBJDIR} -I${S} -I${S}/arch 32CPPFLAGS+= ${INCLUDES} -nostdinc -D_STANDALONE -DHEAP_LIMIT=0x8002ffff 33CFLAGS+= -mips2 -EL -mno-abicalls -ffreestanding -mmemcpy 34.if ${HAVE_GCC3} == "no" 35CFLAGS+= -mno-half-pic 36.endif 37LD_SCRIPT= lcboot.ldscript 38 39.if defined(ROMICE) && (${ROMICE} == "yes") 40CPPFLAGS+= -DROMICE 41.endif 42 43.if !make(obj) && !make(clean) && !make(cleandir) 44.BEGIN: 45 @([ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine) 46 @[ -h mips ] || ln -s ${S}/arch/mips/include mips 47.NOPATH: machine 48.endif 49CLEANFILES+= machine mips 50 51${OBJS}: machine mips 52 53### find out what to use for libkern 54.include "${S}/lib/libkern/Makefile.inc" 55LIBKERN= ${KERNLIB} 56 57### find out what to use for libz 58.include "${S}/lib/libz/Makefile.inc" 59LIBZ= ${ZLIB} 60 61### find out what to use for libsa 62SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes" 63SAMISCMAKEFLAGS+="SA_USE_CREAD=yes" 64.include "${S}/lib/libsa/Makefile.inc" 65LIBSA= ${SALIB} 66 67LIBLIST= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBSA} 68 69# if there is a 'version' file, add rule for vers.c and add it to SRCS 70# and CLEANFILES 71.if exists (${VERSIONFILE}) 72SRCS+= vers.c 73CLEANFILES+= vers.c 74.PHONY: vers.c 75vers.c: ${VERSIONFILE} 76 ${HOST_SH} ${S}/conf/newvers_stand.sh ${.ALLSRC} 'hpcmips' ${NEWVERSWHAT} 77.endif 78 79CLEANFILES+= ${PROG} 80${PROG}: ${OBJS} ${LIBKERN} ${LIBSA} ${LIBZ} 81 ${LD} -o ${PROG} -T ${LD_SCRIPT} ${OBJS} ${LIBLIST} 82 83CLEANFILES+= ${SREC} 84all: ${SREC} 85${SREC}: ${PROG} 86 ${OBJCOPY} -S -O srec ${PROG} ${SREC} 87 88.include <bsd.prog.mk> 89