1 # $Id: Makefile,v 1.6 2013/06/23 13:57:27 matt Exp $ 2 3 S= ${.CURDIR}/../../../../ 4 PROG= bootimx23 5 SRCS= args_prep.c boot_prep.c clock_prep.c common.c emi_prep.c \ 6 pinctrl_prep.c power_prep.c 7 8 .include <bsd.own.mk> 9 10 CLEANFILES+= ${PROG} 11 CFLAGS+= -Wall -Wno-main -ffreestanding -fno-unwind-tables 12 CFLAGS+= -march=armv5te -mtune=arm926ej-s 13 CPPFLAGS+= -D_STANDALONE -DMEMSIZE=64 14 CPPFLAGS+= -DKERNEL_BOOT_ARGS=\"root=ld0a\" 15 CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch 16 CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft 17 #CPPFLAGS+= -DDEBUG 18 #DBG= -g 19 20 LIBCRT0= # nothing 21 LIBCRTBEGIN= # nothing 22 LIBCRTEND= # nothing 23 LIBC= # nothing 24 25 MAN= # no manual page 26 NOMAN= # defined 27 STRIPFLAG= 28 BINMODE= 444 29 30 RELOC= 0x00000000 31 ENTRY= _start 32 33 ### find out what to use for libkern 34 KERN_AS= library 35 .include "${S}/lib/libkern/Makefile.inc" 36 LIBKERN= ${KERNLIB} 37 38 ### find out what to use for libsa 39 SA_AS= library 40 .include "${S}/lib/libsa/Makefile.inc" 41 LIBSA= ${SALIB} 42 43 ${PROG}: ${OBJS} ${LIBSA} ${LIBKERN} 44 ${MKTARGET_LINK} 45 ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET} \ 46 ${OBJS} ${LIBSA} ${LIBKERN} 47 48 49 cleandir distclean: .WAIT cleanlibdir 50 51 cleanlibdir: 52 -rm -rf lib 53 54 .include <bsd.klinks.mk> 55 .include <bsd.prog.mk> 56 57