Makefile (40338) | Makefile (40555) |
---|---|
1# $Id: Makefile,v 1.11 1998/10/12 01:03:00 rnordier Exp $ | 1# $Id: Makefile,v 1.12 1998/10/14 07:08:16 peter Exp $ |
2 3BASE= loader 4PROG= ${BASE} 5NOMAN= 6STRIP= 7NEWVERSWHAT= "bootstrap loader" 8BINDIR?= /boot 9 10# architecture-specific loader code 11SRCS= main.c conf.c 12 13# Enable PnP and ISA-PnP code. | 2 3BASE= loader 4PROG= ${BASE} 5NOMAN= 6STRIP= 7NEWVERSWHAT= "bootstrap loader" 8BINDIR?= /boot 9 10# architecture-specific loader code 11SRCS= main.c conf.c 12 13# Enable PnP and ISA-PnP code. |
14#HAVE_PNP= yes 15#HAVE_ISABUS= yes | 14HAVE_PNP= yes 15HAVE_ISABUS= yes |
16 17# Always add MI sources 18.PATH: ${.CURDIR}/../../common 19.include <${.CURDIR}/../../common/Makefile.inc> 20CFLAGS+= -I${.CURDIR}/../../common 21CFLAGS+= -I${.CURDIR}/../../.. -I. 22 | 16 17# Always add MI sources 18.PATH: ${.CURDIR}/../../common 19.include <${.CURDIR}/../../common/Makefile.inc> 20CFLAGS+= -I${.CURDIR}/../../common 21CFLAGS+= -I${.CURDIR}/../../.. -I. 22 |
23CLEANFILES+= vers.c vers.o ${BASE}.list setdef0.o setdef1.o setdefs.h \ 24 gensetdefs.o gensetdefs ${BASE}.bin | 23CLEANFILES+= vers.c vers.o ${BASE}.list ${BASE}.bin |
25 26CFLAGS+= -Wall 27LDFLAGS= -nostdlib -static -Ttext 0x1000 28 29# i386 standalone support library 30LIBI386= ${.OBJDIR}/../libi386/libi386.a 31CFLAGS+= -I${.CURDIR}/.. 32 --- 11 unchanged lines hidden (view full) --- 44BTXLDR= ${BTXDIR}/btxldr/btxldr 45BTXKERN= ${BTXDIR}/btx/btx 46BTXCRT= ${BTXDIR}/lib/crt0.o 47CFLAGS+= -I${.CURDIR}/../btx/lib 48 49# BTX is expecting ELF components 50CFLAGS+= -elf 51 | 24 25CFLAGS+= -Wall 26LDFLAGS= -nostdlib -static -Ttext 0x1000 27 28# i386 standalone support library 29LIBI386= ${.OBJDIR}/../libi386/libi386.a 30CFLAGS+= -I${.CURDIR}/.. 31 --- 11 unchanged lines hidden (view full) --- 43BTXLDR= ${BTXDIR}/btxldr/btxldr 44BTXKERN= ${BTXDIR}/btx/btx 45BTXCRT= ${BTXDIR}/lib/crt0.o 46CFLAGS+= -I${.CURDIR}/../btx/lib 47 48# BTX is expecting ELF components 49CFLAGS+= -elf 50 |
51# New linker set code 52CFLAGS+= -DNEW_LINKER_SET 53 |
|
52# Debug me! 53#CFLAGS+= -g 54#LDFLAGS+= -g 55 56vers.o: 57 sh ${.CURDIR}/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 58 ${CC} -c vers.c 59 60${BASE}: ${BASE}.bin ${BTXLDR} ${BTXKERN} 61 btxld -v -f aout -e 0x100000 -o ${.TARGET} -l ${BTXLDR} -b ${BTXKERN} \ 62 ${BASE}.bin 63 | 54# Debug me! 55#CFLAGS+= -g 56#LDFLAGS+= -g 57 58vers.o: 59 sh ${.CURDIR}/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 60 ${CC} -c vers.c 61 62${BASE}: ${BASE}.bin ${BTXLDR} ${BTXKERN} 63 btxld -v -f aout -e 0x100000 -o ${.TARGET} -l ${BTXLDR} -b ${BTXKERN} \ 64 ${BASE}.bin 65 |
64${BASE}.bin: ${OBJS} ${LIBI386} vers.o setdef0.o setdef1.o 65 ${CC} ${LDFLAGS} -o ${.TARGET} ${BTXCRT} setdef0.o ${OBJS} vers.o setdef1.o \ 66 ${LIBSTAND} ${LIBI386} ${LIBSTAND} | 66${BASE}.bin: ${BASE}.sym 67 cp ${.ALLSRC} ${.TARGET} 68 strip ${.TARGET} |
67 | 69 |
68setdef0.o: setdefs.h | 70# Cannot use ${OBJS} above this line 71.include <bsd.prog.mk> |
69 | 72 |
70setdef1.o: setdefs.h | 73${BASE}.sym: ${OBJS} ${LIBI386} vers.o 74 ${CC} ${LDFLAGS} -o ${.TARGET} ${BTXCRT} ${OBJS} vers.o \ 75 ${LIBSTAND} ${LIBI386} ${LIBSTAND} |
71 | 76 |
77# If it's not there, don't consider it a target 78.if exists(${.CURDIR}/../../../i386/include) 79beforedepend ${OBJS}: machine 80 |
|
72machine: 73 ln -sf ${.CURDIR}/../../../i386/include machine 74 | 81machine: 82 ln -sf ${.CURDIR}/../../../i386/include machine 83 |
84.endif 85 |
|
75CLEANFILES+= machine 76 | 86CLEANFILES+= machine 87 |
77.include <bsd.prog.mk> | |
78 | 88 |
79# Linker set gymnastics 80setdefs.h: gensetdefs ${OBJS} 81 @echo Generating linker sets 82 @./gensetdefs ${OBJS} >setdefs.h 83 84gensetdefs: gensetdefs.o 85 ${CC} -static gensetdefs.o -o $@ 86 87gensetdefs.o: gensetdefs.c 88 ${CC} -c $< 89 90beforedepend ${OBJS}: machine | |