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