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