Deleted Added
full compact
Makefile (260096) Makefile (260291)
1# $FreeBSD: stable/9/sys/boot/pc98/boot2/Makefile 260096 2013-12-30 20:15:46Z dim $
1# $FreeBSD: stable/9/sys/boot/pc98/boot2/Makefile 260291 2014-01-04 22:00:07Z dim $
2
3.include <bsd.own.mk>
4
5# XXX: clang can compile the boot code just fine, but boot2 gets too big
6CC:= gcc
7COMPILER_TYPE:= gcc
8
9FILES= boot boot1 boot2

--- 35 unchanged lines hidden (view full) ---

45 -Winline --param max-inline-insns-single=100
46
47# Set machine type to PC98_SYSTEM_PARAMETER
48#CFLAGS+= -DSET_MACHINE_TYPE
49
50# Initialize the bi_bios_geom using the BIOS geometry
51#CFLAGS+= -DGET_BIOSGEOM
52
2
3.include <bsd.own.mk>
4
5# XXX: clang can compile the boot code just fine, but boot2 gets too big
6CC:= gcc
7COMPILER_TYPE:= gcc
8
9FILES= boot boot1 boot2

--- 35 unchanged lines hidden (view full) ---

45 -Winline --param max-inline-insns-single=100
46
47# Set machine type to PC98_SYSTEM_PARAMETER
48#CFLAGS+= -DSET_MACHINE_TYPE
49
50# Initialize the bi_bios_geom using the BIOS geometry
51#CFLAGS+= -DGET_BIOSGEOM
52
53LDFLAGS=-static -N --gc-sections
53LD_FLAGS=-static -N --gc-sections
54
55# Pick up ../Makefile.inc early.
56.include <bsd.init.mk>
57
58.PATH: ${.CURDIR}/../../i386/boot2
59
60CLEANFILES= boot
61
62boot: boot1 boot2
63 cat boot1 boot2 > boot
64
65CLEANFILES+= boot1 boot1.out boot1.o
66
67boot1: boot1.out
68 objcopy -S -O binary boot1.out ${.TARGET}
69
70boot1.out: boot1.o
54
55# Pick up ../Makefile.inc early.
56.include <bsd.init.mk>
57
58.PATH: ${.CURDIR}/../../i386/boot2
59
60CLEANFILES= boot
61
62boot: boot1 boot2
63 cat boot1 boot2 > boot
64
65CLEANFILES+= boot1 boot1.out boot1.o
66
67boot1: boot1.out
68 objcopy -S -O binary boot1.out ${.TARGET}
69
70boot1.out: boot1.o
71 ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o
71 ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o
72
73CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \
74 boot2.s boot2.s.tmp boot2.h sio.o
75
76boot2: boot2.ld
77 @set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \
78 echo "$$x bytes available"; test $$x -ge 0
79 dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync

--- 4 unchanged lines hidden (view full) ---

84
85boot2.ldr:
86 dd if=/dev/zero of=${.TARGET} bs=276 count=1
87
88boot2.bin: boot2.out
89 objcopy -S -O binary boot2.out ${.TARGET}
90
91boot2.out: ${BTXCRT} boot2.o sio.o
72
73CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \
74 boot2.s boot2.s.tmp boot2.h sio.o
75
76boot2: boot2.ld
77 @set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \
78 echo "$$x bytes available"; test $$x -ge 0
79 dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync

--- 4 unchanged lines hidden (view full) ---

84
85boot2.ldr:
86 dd if=/dev/zero of=${.TARGET} bs=276 count=1
87
88boot2.bin: boot2.out
89 objcopy -S -O binary boot2.out ${.TARGET}
90
91boot2.out: ${BTXCRT} boot2.o sio.o
92 ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC}
92 ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC}
93
94boot2.o: boot2.s
95
96SRCS= boot2.c boot2.h
97
98boot2.s: boot2.c boot2.h ${.CURDIR}/../../common/ufsread.c
99 ${CC} ${CFLAGS} -S -o boot2.s.tmp ${.CURDIR}/boot2.c
100 sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s
101 rm -f boot2.s.tmp
102
103boot2.h: boot1.out
104 ${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T (read|putc)/ \
105 { x = $$1 - ORG1; \
106 printf("#define %sORG %#x\n", toupper($$3), REL1 + x) }' \
107 ORG1=`printf "%d" ${ORG1}` \
108 REL1=`printf "%d" ${REL1}` > ${.TARGET}
109
110.include <bsd.prog.mk>
93
94boot2.o: boot2.s
95
96SRCS= boot2.c boot2.h
97
98boot2.s: boot2.c boot2.h ${.CURDIR}/../../common/ufsread.c
99 ${CC} ${CFLAGS} -S -o boot2.s.tmp ${.CURDIR}/boot2.c
100 sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s
101 rm -f boot2.s.tmp
102
103boot2.h: boot1.out
104 ${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T (read|putc)/ \
105 { x = $$1 - ORG1; \
106 printf("#define %sORG %#x\n", toupper($$3), REL1 + x) }' \
107 ORG1=`printf "%d" ${ORG1}` \
108 REL1=`printf "%d" ${REL1}` > ${.TARGET}
109
110.include <bsd.prog.mk>