1# $Id: Makefile,v 1.14 2014/07/22 17:46:59 bouyer Exp $ 2 3S= ${.CURDIR}/../../../../ 4PROG= bootimx23 5SRCS= 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 9CLEANFILES+= ${PROG} 10CFLAGS+= -Wall -Wno-main -ffreestanding -fno-unwind-tables 11CPUFLAGS= -march=armv5te -mtune=arm926ej-s 12CPPFLAGS+= -D_STANDALONE -DMEMSIZE=64 13CPPFLAGS+= -DKERNEL_BOOT_ARGS=\"root=ld0a\" 14CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch 15CPPFLAGS+= ${ARM_APCS_FLAGS} 16.if ${HAVE_LLVM:Uno} != "no" || ${HAVE_GCC:U0} >= 48 17CPPFLAGS+= -marm 18.else 19CPPFLAGS+= -mno-thumb -mno-thumb-interwork 20.endif 21#CPPFLAGS+= -DDEBUG 22#CPPFLAGS+= -DDIAGNOSTIC 23DBG= -g 24 25LIBCRT0= # nothing 26LIBCRTI= # nothing 27LIBCRTBEGIN= # nothing 28LIBCRTEND= # nothing 29LIBC= # nothing 30 31MAN= # no manual page 32NOMAN= # defined 33STRIPFLAG= 34BINMODE= 444 35 36RELOC= 0x00000000 37ENTRY= _start 38 39### find out what to use for libkern 40KERN_AS= library 41.include "${S}/lib/libkern/Makefile.inc" 42LIBKERN= ${KERNLIB} 43 44### find out what to use for libsa 45SA_AS= library 46.include "${S}/lib/libsa/Makefile.inc" 47LIBSA= ${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 55cleandir distclean: .WAIT cleanlibdir 56 57cleanlibdir: 58 -rm -rf lib 59 60.include <bsd.klinks.mk> 61.include <bsd.prog.mk> 62 63