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