1157873Simp# $FreeBSD: releng/11.0/sys/boot/arm/at91/Makefile.inc 251250 2013-06-02 11:44:23Z tijl $
2157873Simp
3157925Simp.if !target(__at91_boot_Makefile.inc__)
4161199Simp.PATH:	${.CURDIR}/../../../../libkern ${.CURDIR}/../../../../libkern/arm
5161199Simp
6157925Simp__at91_boot_Makefile.inc__:
7157925Simp
8171426Simp# tsc, bwct, kb920x, centipad are the supported flavors
9171426SimpBOOT_FLAVOR?=kb920x
10164133Simp
11164133SimpCFLAGS=-Os -mcpu=arm9 -ffreestanding \
12157873Simp	-I${.CURDIR}/../libat91 \
13161199Simp	-I${.CURDIR}/../../../.. \
14161199Simp	-I${.CURDIR}/../../../../arm \
15161199Simp	-D_KERNEL \
16161199Simp	-Wall -Waggregate-return  \
17161199Simp	-Wnested-externs \
18161199Simp	-Wpointer-arith -Wshadow -Wwrite-strings \
19164133Simp	-Werror \
20164133Simp	-Wmissing-prototypes \
21164133Simp	-Wmissing-declarations 
22161199Simp# -Wstrict-prototypes 
23157873Simp
24251250StijlCFLAGS+=-DBOOT_${BOOT_FLAVOR:tu}
25157873Simp
26157873SimpLIBAT91=${.OBJDIR}/../libat91/libat91.a
27157873Simp
28161199SimpLD ?= ld
29161199SimpOBJCOPY ?= objcopy
30161199Simp
31157873Simp.if defined(P)
32157873Simp${P}:	${P}.out
33161199Simp	${OBJCOPY} -S -O binary ${P}.out ${.TARGET}
34161199Simp	@set -- `ls -l ${.TARGET}`; x=$$((12288-$$5)); \
35157925Simp	    echo "$$x bytes available"; test $$x -ge 0
36157873Simp
37157873Simp${P}.out: ${OBJS}
38161199Simp	${LD} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LIBAT91}
39157873Simp
40157873SimpCLEANFILES+= ${P} ${P}.out
41157873Simp.endif
42157925Simp
43157925Simp.if defined(WITH_TAG_LIST)
44157925SimpMK_TAG_LIST:=yes
45157925Simp.else
46157925SimpMK_TAG_LIST:=no
47157925Simp.endif
48157925Simp
49163598Simp.if defined(WITH_FPGA)
50163598SimpMK_FPGA:=yes
51163598Simp.else
52161199SimpMK_FPGA:=no
53157925Simp.endif
54161199Simp
55161199Simp.endif
56180012Sru
57180012Sru.include "../Makefile.inc"
58