1 # $Id: Makefile,v 1.7 2013/08/15 21:41:09 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+= -mno-thumb -mno-thumb-interwork 18 #CPPFLAGS+= -DDEBUG 19 #DBG= -g 20 21 LIBCRT0= # nothing 22 LIBCRTBEGIN= # nothing 23 LIBCRTEND= # nothing 24 LIBC= # nothing 25 26 MAN= # no manual page 27 NOMAN= # defined 28 STRIPFLAG= 29 BINMODE= 444 30 31 RELOC= 0x00000000 32 ENTRY= _start 33 34 ### find out what to use for libkern 35 KERN_AS= library 36 .include "${S}/lib/libkern/Makefile.inc" 37 LIBKERN= ${KERNLIB} 38 39 ### find out what to use for libsa 40 SA_AS= library 41 .include "${S}/lib/libsa/Makefile.inc" 42 LIBSA= ${SALIB} 43 44 ${PROG}: ${OBJS} ${LIBSA} ${LIBKERN} 45 ${MKTARGET_LINK} 46 ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET} \ 47 ${OBJS} ${LIBSA} ${LIBKERN} 48 49 50 cleandir distclean: .WAIT cleanlibdir 51 52 cleanlibdir: 53 -rm -rf lib 54 55 .include <bsd.klinks.mk> 56 .include <bsd.prog.mk> 57 58