Makefile revision 183651
1# $FreeBSD: head/sys/boot/arm/ixp425/boot2/Makefile 183651 2008-10-06 19:38:10Z jhay $ 2 3# We get a lot of the std lib functions from here. 4.PATH: ${.CURDIR}/../../at91/libat91 5 6# Enable to get debug msgs 7#DEBUG=yes 8 9# Hack to search through the kernel for ufs:ad0s1a and replace it with 10# the correct one for the active slice/partition. 11FIXUP_BOOT_DRV=yes 12 13P=boot2 14FILES=${P} 15SRCS=arm_init.S boot2.c ${BOOT_FLAVOR:L}_board.c 16SRCS+=memchr.c memcmp.c memcpy.c memmem.c memset.c printf.c strcmp.c strcpy.c 17SRCS+=strlen.c ashldi3.c divsi3.S muldi3.c 18NO_MAN= 19 20KERNPHYSADDR=0x180000 21KERNVIRTADDR=${KERNPHYSADDR} 22BOOT_STACK=0x200000-4 23M=${MACHINE_ARCH} 24LDFLAGS=-e ${KERNPHYSADDR} -EB -T ldscript.${M} 25OBJS+= ${SRCS:N*.h:R:S/$/.o/g} 26S=${.CURDIR}/../../../.. 27 28CFLAGS+= \ 29 -DBOOT_STACK=${BOOT_STACK} \ 30 -I${.CURDIR}/../../../common \ 31 -I${.CURDIR} 32 33.if defined(FIXUP_BOOT_DRV) 34CFLAGS+=-DFIXUP_BOOT_DRV 35.endif 36.if defined(DEBUG) 37CFLAGS+=-DDEBUG 38.endif 39 40ldscript.$M: $S/conf/ldscript.$M 41 cat $S/conf/ldscript.$M|sed s/KERNPHYSADDR/${KERNPHYSADDR}/g| \ 42 sed s/KERNVIRTADDR/${KERNVIRTADDR}/g | \ 43 sed s/" + SIZEOF_HEADERS"// > ldscript.$M 44 45${P}: ldscript.$M 46 47CLEANFILES+=ldscript.$M 48 49memchr.c: $S/../lib/libc/string/memchr.c 50 sed -e 's/string\.h/lib.h/' < $S/../lib/libc/string/memchr.c > \ 51 ${.TARGET} 52 53memmem.c: $S/../lib/libc/string/memmem.c 54 sed -e 's/string\.h/lib.h/' < $S/../lib/libc/string/memmem.c > \ 55 ${.TARGET} 56 57CLEANFILES+=memchr.c memmem.c 58 59ashldi3.o: $S/libkern/ashldi3.c 60 cc -c ${CFLAGS} -D_KERNEL -o ${.TARGET} ${.IMPSRC} 61 62divsi3.o: $S/libkern/${M}/divsi3.S 63 cc -c ${CFLAGS} -D_KERNEL -o ${.TARGET} ${.IMPSRC} 64 65muldi3.o: $S/libkern/${M}/muldi3.c 66 cc -c ${CFLAGS} -D_KERNEL -o ${.TARGET} ${.IMPSRC} 67 68inflate.c: $S/kern/inflate.c 69 sed -e 's/extern void putstr (char/extern void putstr (const char/' < \ 70 $S/kern/inflate.c > ${.TARGET} 71 72CLEANFILES+=inflate.c 73 74.include <bsd.prog.mk> 75 76