2006-04-19 17:16:49 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2006-04-21 07:41:36 +00:00
|
|
|
.if !target(__at91_boot_Makefile.inc__)
|
2006-08-10 18:22:56 +00:00
|
|
|
.PATH: ${.CURDIR}/../../../../libkern ${.CURDIR}/../../../../libkern/arm
|
|
|
|
|
2006-04-21 07:41:36 +00:00
|
|
|
__at91_boot_Makefile.inc__:
|
|
|
|
|
2007-07-13 14:27:05 +00:00
|
|
|
# tsc, bwct, kb920x, centipad are the supported flavors
|
|
|
|
BOOT_FLAVOR?=kb920x
|
2006-11-09 19:58:14 +00:00
|
|
|
|
|
|
|
CFLAGS=-Os -mcpu=arm9 -ffreestanding \
|
2006-04-19 17:16:49 +00:00
|
|
|
-I${.CURDIR}/../libat91 \
|
2006-08-10 18:22:56 +00:00
|
|
|
-I${.CURDIR}/../../../.. \
|
|
|
|
-I${.CURDIR}/../../../../arm \
|
|
|
|
-D_KERNEL \
|
|
|
|
-Wall -Waggregate-return \
|
|
|
|
-Wnested-externs \
|
|
|
|
-Wpointer-arith -Wshadow -Wwrite-strings \
|
2006-11-09 19:58:14 +00:00
|
|
|
-Werror \
|
|
|
|
-Wmissing-prototypes \
|
|
|
|
-Wmissing-declarations
|
2006-08-10 18:22:56 +00:00
|
|
|
# -Wstrict-prototypes
|
2006-04-19 17:16:49 +00:00
|
|
|
|
2006-11-09 19:58:14 +00:00
|
|
|
CFLAGS+=-DBOOT_${BOOT_FLAVOR:U}
|
2006-04-19 17:16:49 +00:00
|
|
|
|
|
|
|
LIBAT91=${.OBJDIR}/../libat91/libat91.a
|
|
|
|
|
2006-08-10 18:22:56 +00:00
|
|
|
LD ?= ld
|
|
|
|
OBJCOPY ?= objcopy
|
|
|
|
|
2006-04-19 17:16:49 +00:00
|
|
|
.if defined(P)
|
|
|
|
${P}: ${P}.out
|
2006-08-10 18:22:56 +00:00
|
|
|
${OBJCOPY} -S -O binary ${P}.out ${.TARGET}
|
|
|
|
@set -- `ls -l ${.TARGET}`; x=$$((12288-$$5)); \
|
2006-04-21 07:41:36 +00:00
|
|
|
echo "$$x bytes available"; test $$x -ge 0
|
2006-04-19 17:16:49 +00:00
|
|
|
|
|
|
|
${P}.out: ${OBJS}
|
2006-08-10 18:22:56 +00:00
|
|
|
${LD} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LIBAT91}
|
2006-04-19 17:16:49 +00:00
|
|
|
|
|
|
|
CLEANFILES+= ${P} ${P}.out
|
|
|
|
.endif
|
2006-04-21 07:41:36 +00:00
|
|
|
|
|
|
|
.if defined(WITH_TAG_LIST)
|
|
|
|
MK_TAG_LIST:=yes
|
|
|
|
.else
|
|
|
|
MK_TAG_LIST:=no
|
|
|
|
.endif
|
|
|
|
|
2006-10-21 22:51:21 +00:00
|
|
|
.if defined(WITH_FPGA)
|
2006-08-10 18:22:56 +00:00
|
|
|
MK_FPGA:=yes
|
2006-10-21 22:51:21 +00:00
|
|
|
.else
|
|
|
|
MK_FPGA:=no
|
2006-08-10 18:22:56 +00:00
|
|
|
.endif
|
|
|
|
|
2006-04-21 07:41:36 +00:00
|
|
|
.endif
|