Makefile revision 1.5
1# $Id: Makefile,v 1.5 2013/02/23 16:22:39 jkunz Exp $
2
3S=		${.CURDIR}/../../../../
4PROG=		bootimx23
5SRCS=		args_prep.c boot_prep.c clock_prep.c common.c emi_prep.c \
6		pinctrl_prep.c power_prep.c
7
8.include <bsd.own.mk>
9
10CLEANFILES+=	${PROG}
11CFLAGS+=	-Wall -Wno-main -ffreestanding -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+=	-mabi=apcs-gnu -mfloat-abi=soft
16#CPPFLAGS+=	-DDEBUG
17#DBG=		-g
18
19LIBCRT0=	# nothing
20LIBCRTBEGIN=	# nothing
21LIBCRTEND=	# nothing
22LIBC=		# nothing
23
24MAN=		# no manual page
25NOMAN=		# defined
26STRIPFLAG=
27BINMODE=	444
28
29RELOC=		0x00000000
30ENTRY=		_start
31
32### find out what to use for libkern
33KERN_AS=	library
34.include "${S}/lib/libkern/Makefile.inc"
35LIBKERN=	${KERNLIB}
36
37### find out what to use for libsa
38SA_AS=		library
39.include "${S}/lib/libsa/Makefile.inc"
40LIBSA=		${SALIB}
41
42${PROG}: ${OBJS} ${LIBSA} ${LIBKERN}
43	${MKTARGET_LINK}
44	${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET} \
45	    ${OBJS} ${LIBSA} ${LIBKERN}
46
47
48cleandir distclean: .WAIT cleanlibdir
49
50cleanlibdir:
51	-rm -rf lib
52
53.include <bsd.klinks.mk>
54.include <bsd.prog.mk>
55
56