Makefile revision 1.12
1# $Id: Makefile,v 1.12 2013/12/15 18:08:37 joerg 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 11CFLAGS+= -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 26LIBCRTBEGIN= # nothing 27LIBCRTEND= # nothing 28LIBC= # nothing 29 30MAN= # no manual page 31NOMAN= # defined 32STRIPFLAG= 33BINMODE= 444 34 35RELOC= 0x00000000 36ENTRY= _start 37 38### find out what to use for libkern 39KERN_AS= library 40.include "${S}/lib/libkern/Makefile.inc" 41LIBKERN= ${KERNLIB} 42 43### find out what to use for libsa 44SA_AS= library 45.include "${S}/lib/libsa/Makefile.inc" 46LIBSA= ${SALIB} 47 48${PROG}: ${OBJS} ${LIBSA} ${LIBKERN} 49 ${MKTARGET_LINK} 50 ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET} \ 51 ${OBJS} ${LIBSA} ${LIBKERN} 52 53 54cleandir distclean: .WAIT cleanlibdir 55 56cleanlibdir: 57 -rm -rf lib 58 59.include <bsd.klinks.mk> 60.include <bsd.prog.mk> 61 62