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