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