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