1 # $Id: Makefile,v 1.9 2013/11/04 21:18:05 christos Exp $ 2 3 S= ${.CURDIR}/../../../../ 4 PROG= bootimx23 5 SRCS= bootimx23.c power_prep.c clock_prep.c emi_prep.c pinctrl_prep.c common.c args_prep.c 6 7 .include <bsd.own.mk> 8 9 CLEANFILES+= ${PROG} 10 CFLAGS+= -Wall -Wno-main -ffreestanding -fno-unwind-tables 11 CFLAGS+= -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 .if ${HAVE_GCC} < 48 17 CPPFLAGS+= -mno-thumb -mno-thumb-interwork 18 .endif 19 #CPPFLAGS+= -DDEBUG 20 #CPPFLAGS+= -DDIAGNOSTIC 21 DBG= -g 22 23 LIBCRT0= # nothing 24 LIBCRTBEGIN= # nothing 25 LIBCRTEND= # nothing 26 LIBC= # nothing 27 28 MAN= # no manual page 29 NOMAN= # defined 30 STRIPFLAG= 31 BINMODE= 444 32 33 RELOC= 0x00000000 34 ENTRY= _start 35 36 ### find out what to use for libkern 37 KERN_AS= library 38 .include "${S}/lib/libkern/Makefile.inc" 39 LIBKERN= ${KERNLIB} 40 41 ### find out what to use for libsa 42 SA_AS= library 43 .include "${S}/lib/libsa/Makefile.inc" 44 LIBSA= ${SALIB} 45 46 ${PROG}: ${OBJS} ${LIBSA} ${LIBKERN} 47 ${MKTARGET_LINK} 48 ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET} \ 49 ${OBJS} ${LIBSA} ${LIBKERN} 50 51 52 cleandir distclean: .WAIT cleanlibdir 53 54 cleanlibdir: 55 -rm -rf lib 56 57 .include <bsd.klinks.mk> 58 .include <bsd.prog.mk> 59 60