2008-02-16 17:13:11 -05:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
2014-05-06 00:22:01 -04:00
|
|
|
.include <src.opts.mk>
|
2014-03-01 14:02:00 -05:00
|
|
|
|
2012-03-21 16:53:47 -04:00
|
|
|
.PATH: ${.CURDIR}/../../common
|
|
|
|
|
|
2008-02-16 17:13:11 -05:00
|
|
|
LIB= uboot
|
|
|
|
|
INTERNALLIB=
|
2008-09-03 11:39:50 -04:00
|
|
|
WARNS?= 2
|
2008-02-16 17:13:11 -05:00
|
|
|
|
2012-09-09 07:34:27 -04:00
|
|
|
SRCS= crc32.c console.c copy.c devicename.c elf_freebsd.c glue.c
|
2012-03-21 16:53:47 -04:00
|
|
|
SRCS+= module.c net.c reboot.c time.c
|
2008-02-16 17:13:11 -05:00
|
|
|
|
2008-03-13 13:54:21 -04:00
|
|
|
CFLAGS+= -ffreestanding -msoft-float
|
2008-02-16 17:13:11 -05:00
|
|
|
|
2008-03-13 13:54:21 -04:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
2010-05-25 11:21:39 -04:00
|
|
|
|
2012-09-09 07:34:27 -04:00
|
|
|
.if !defined(LOADER_NO_DISK_SUPPORT)
|
|
|
|
|
SRCS+= disk.c
|
|
|
|
|
CFLAGS+= -DLOADER_DISK_SUPPORT
|
|
|
|
|
.endif
|
|
|
|
|
|
2014-03-01 14:02:00 -05:00
|
|
|
.if ${MK_FDT} != "no"
|
|
|
|
|
LOADER_FDT_SUPPORT= yes
|
|
|
|
|
.else
|
|
|
|
|
LOADER_FDT_SUPPORT= no
|
|
|
|
|
.endif
|
|
|
|
|
|
|
|
|
|
.if ${LOADER_FDT_SUPPORT} == "yes"
|
2014-11-01 06:50:18 -04:00
|
|
|
CFLAGS+= -DLOADER_FDT_SUPPORT -I${.CURDIR}/../../fdt
|
2014-03-01 14:02:00 -05:00
|
|
|
.endif
|
|
|
|
|
|
2010-05-25 11:21:39 -04:00
|
|
|
# Pick up FDT includes
|
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../../../sys/contrib/libfdt/
|
|
|
|
|
|
2008-02-16 17:13:11 -05:00
|
|
|
# Pick up the bootstrap header for some interface items
|
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
|
|
|
|
|
|
|
|
|
|
.ifdef(BOOT_DISK_DEBUG)
|
|
|
|
|
# Make the disk code more talkative
|
|
|
|
|
CFLAGS+= -DDISK_DEBUG
|
|
|
|
|
.endif
|
|
|
|
|
|
|
|
|
|
machine:
|
2010-08-22 21:50:34 -04:00
|
|
|
ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine
|
2008-02-16 17:13:11 -05:00
|
|
|
|
|
|
|
|
CLEANFILES+= machine
|
|
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|
|
|
|
|
|
|
|
|
|
beforedepend ${OBJS}: machine
|