1 # $Id: Makefile,v 1.3 2013/02/05 07:28:48 matt Exp $ 2 3 S= ${.CURDIR}/../../../../ 4 PROG= bootimx23 5 SRCS= boot_prep.c power_prep.c clock_prep.c emi_prep.c \ 6 pinctrl_prep.c common.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 13 CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch 14 CPPFLAGS+= -mabi=atpcs -mfloat-abi=soft -Wa,-meabi=gnu 15 #CPPFLAGS+= -DDEBUG 16 #DBG= -g 17 18 LIBCRT0= # nothing 19 LIBCRTBEGIN= # nothing 20 LIBCRTEND= # nothing 21 LIBC= # nothing 22 23 MAN= # no manual page 24 NOMAN= # defined 25 STRIPFLAG= 26 BINMODE= 444 27 28 RELOC= 0x00000000 29 ENTRY= _start 30 31 ### find out what to use for libkern 32 KERN_AS= library 33 .include "${S}/lib/libkern/Makefile.inc" 34 LIBKERN= ${KERNLIB} 35 36 ### find out what to use for libsa 37 SA_AS= library 38 .include "${S}/lib/libsa/Makefile.inc" 39 LIBSA= ${SALIB} 40 41 ${PROG}: ${OBJS} ${LIBSA} ${LIBKERN} 42 ${MKTARGET_LINK} 43 ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET} \ 44 ${OBJS} ${LIBSA} ${LIBKERN} 45 46 47 cleandir distclean: .WAIT cleanlibdir 48 49 cleanlibdir: 50 -rm -rf lib 51 52 .include <bsd.klinks.mk> 53 .include <bsd.prog.mk> 54 55