199767f8919635c4928607450d9e0abb932109ceToomas Soome# $FreeBSD$
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome.include <src.opts.mk>
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome.PATH: ${.CURDIR}/../../common
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLIB= uboot
199767f8919635c4928607450d9e0abb932109ceToomas SoomeINTERNALLIB=
199767f8919635c4928607450d9e0abb932109ceToomas SoomeWARNS?= 2
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeSRCS= crc32.c console.c copy.c devicename.c elf_freebsd.c glue.c
199767f8919635c4928607450d9e0abb932109ceToomas SoomeSRCS+= module.c net.c reboot.c time.c
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS+= -ffreestanding -msoft-float
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome.if !defined(LOADER_NO_DISK_SUPPORT)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeSRCS+= disk.c
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS+= -DLOADER_DISK_SUPPORT
199767f8919635c4928607450d9e0abb932109ceToomas Soome.endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome.if ${MK_FDT} != "no"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLOADER_FDT_SUPPORT= yes
199767f8919635c4928607450d9e0abb932109ceToomas Soome.else
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLOADER_FDT_SUPPORT= no
199767f8919635c4928607450d9e0abb932109ceToomas Soome.endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome.if ${LOADER_FDT_SUPPORT} == "yes"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS+= -DLOADER_FDT_SUPPORT -I${.CURDIR}/../../fdt
199767f8919635c4928607450d9e0abb932109ceToomas Soome.endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Pick up FDT includes
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS+= -I${.CURDIR}/../../../../sys/contrib/libfdt/
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Pick up the bootstrap header for some interface items
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome.ifdef(BOOT_DISK_DEBUG)
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Make the disk code more talkative
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS+= -DDISK_DEBUG
199767f8919635c4928607450d9e0abb932109ceToomas Soome.endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomemachine:
199767f8919635c4928607450d9e0abb932109ceToomas Soome ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCLEANFILES+= machine
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome.include <bsd.stand.mk>
199767f8919635c4928607450d9e0abb932109ceToomas Soome.include <bsd.lib.mk>
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomebeforedepend ${OBJS}: machine