Makefile revision 183651
1183651Sjhay# $FreeBSD: head/sys/boot/arm/ixp425/boot2/Makefile 183651 2008-10-06 19:38:10Z jhay $ 2183651Sjhay 3183651Sjhay# We get a lot of the std lib functions from here. 4183651Sjhay.PATH: ${.CURDIR}/../../at91/libat91 5183651Sjhay 6183651Sjhay# Enable to get debug msgs 7183651Sjhay#DEBUG=yes 8183651Sjhay 9183651Sjhay# Hack to search through the kernel for ufs:ad0s1a and replace it with 10183651Sjhay# the correct one for the active slice/partition. 11183651SjhayFIXUP_BOOT_DRV=yes 12183651Sjhay 13183651SjhayP=boot2 14183651SjhayFILES=${P} 15183651SjhaySRCS=arm_init.S boot2.c ${BOOT_FLAVOR:L}_board.c 16183651SjhaySRCS+=memchr.c memcmp.c memcpy.c memmem.c memset.c printf.c strcmp.c strcpy.c 17183651SjhaySRCS+=strlen.c ashldi3.c divsi3.S muldi3.c 18183651SjhayNO_MAN= 19183651Sjhay 20183651SjhayKERNPHYSADDR=0x180000 21183651SjhayKERNVIRTADDR=${KERNPHYSADDR} 22183651SjhayBOOT_STACK=0x200000-4 23183651SjhayM=${MACHINE_ARCH} 24183651SjhayLDFLAGS=-e ${KERNPHYSADDR} -EB -T ldscript.${M} 25183651SjhayOBJS+= ${SRCS:N*.h:R:S/$/.o/g} 26183651SjhayS=${.CURDIR}/../../../.. 27183651Sjhay 28183651SjhayCFLAGS+= \ 29183651Sjhay -DBOOT_STACK=${BOOT_STACK} \ 30183651Sjhay -I${.CURDIR}/../../../common \ 31183651Sjhay -I${.CURDIR} 32183651Sjhay 33183651Sjhay.if defined(FIXUP_BOOT_DRV) 34183651SjhayCFLAGS+=-DFIXUP_BOOT_DRV 35183651Sjhay.endif 36183651Sjhay.if defined(DEBUG) 37183651SjhayCFLAGS+=-DDEBUG 38183651Sjhay.endif 39183651Sjhay 40183651Sjhayldscript.$M: $S/conf/ldscript.$M 41183651Sjhay cat $S/conf/ldscript.$M|sed s/KERNPHYSADDR/${KERNPHYSADDR}/g| \ 42183651Sjhay sed s/KERNVIRTADDR/${KERNVIRTADDR}/g | \ 43183651Sjhay sed s/" + SIZEOF_HEADERS"// > ldscript.$M 44183651Sjhay 45183651Sjhay${P}: ldscript.$M 46183651Sjhay 47183651SjhayCLEANFILES+=ldscript.$M 48183651Sjhay 49183651Sjhaymemchr.c: $S/../lib/libc/string/memchr.c 50183651Sjhay sed -e 's/string\.h/lib.h/' < $S/../lib/libc/string/memchr.c > \ 51183651Sjhay ${.TARGET} 52183651Sjhay 53183651Sjhaymemmem.c: $S/../lib/libc/string/memmem.c 54183651Sjhay sed -e 's/string\.h/lib.h/' < $S/../lib/libc/string/memmem.c > \ 55183651Sjhay ${.TARGET} 56183651Sjhay 57183651SjhayCLEANFILES+=memchr.c memmem.c 58183651Sjhay 59183651Sjhayashldi3.o: $S/libkern/ashldi3.c 60183651Sjhay cc -c ${CFLAGS} -D_KERNEL -o ${.TARGET} ${.IMPSRC} 61183651Sjhay 62183651Sjhaydivsi3.o: $S/libkern/${M}/divsi3.S 63183651Sjhay cc -c ${CFLAGS} -D_KERNEL -o ${.TARGET} ${.IMPSRC} 64183651Sjhay 65183651Sjhaymuldi3.o: $S/libkern/${M}/muldi3.c 66183651Sjhay cc -c ${CFLAGS} -D_KERNEL -o ${.TARGET} ${.IMPSRC} 67183651Sjhay 68183651Sjhayinflate.c: $S/kern/inflate.c 69183651Sjhay sed -e 's/extern void putstr (char/extern void putstr (const char/' < \ 70183651Sjhay $S/kern/inflate.c > ${.TARGET} 71183651Sjhay 72183651SjhayCLEANFILES+=inflate.c 73183651Sjhay 74183651Sjhay.include <bsd.prog.mk> 75183651Sjhay 76