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