1 # $Id: Makefile,v 1.5 2013/02/23 16:22:39 jkunz 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 -march=armv5te -mtune=arm926ej-s 12 CPPFLAGS+= -D_STANDALONE -DMEMSIZE=64 13 CPPFLAGS+= -DKERNEL_BOOT_ARGS=\"root=ld0a\" 14 CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch 15 CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft 16 #CPPFLAGS+= -DDEBUG 17 #DBG= -g 18 19 LIBCRT0= # nothing 20 LIBCRTBEGIN= # nothing 21 LIBCRTEND= # nothing 22 LIBC= # nothing 23 24 MAN= # no manual page 25 NOMAN= # defined 26 STRIPFLAG= 27 BINMODE= 444 28 29 RELOC= 0x00000000 30 ENTRY= _start 31 32 ### find out what to use for libkern 33 KERN_AS= library 34 .include "${S}/lib/libkern/Makefile.inc" 35 LIBKERN= ${KERNLIB} 36 37 ### find out what to use for libsa 38 SA_AS= library 39 .include "${S}/lib/libsa/Makefile.inc" 40 LIBSA= ${SALIB} 41 42 ${PROG}: ${OBJS} ${LIBSA} ${LIBKERN} 43 ${MKTARGET_LINK} 44 ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET} \ 45 ${OBJS} ${LIBSA} ${LIBKERN} 46 47 48 cleandir distclean: .WAIT cleanlibdir 49 50 cleanlibdir: 51 -rm -rf lib 52 53 .include <bsd.klinks.mk> 54 .include <bsd.prog.mk> 55 56