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