blob: d899435942fdc287dfeb71c2a30b00860b3558e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,7 @@
#
FDISK=/dev/fd0
-AS=as -32
-CC=gcc
+ASFLAGS=-32
CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
-ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
@@ -17,7 +16,7 @@
OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
config.o memsize.o error.o smp.o cpuid.o vmem.o random.o
-all: clean memtest.bin memtest
+all: memtest.bin memtest
# Link it statically once so I know I don't have undefined
# symbols and then link it dynamically so I have full
@@ -28,7 +27,7 @@
$(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
memtest_shared.bin: memtest_shared
- objcopy -O binary $< memtest_shared.bin
+ objcopy -O binary $< $@
memtest: memtest_shared.bin memtest.lds
$(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@
@@ -44,16 +43,16 @@
memtest.bin: memtest_shared.bin bootsect.o setup.o memtest.bin.lds
$(LD) -T memtest.bin.lds bootsect.o setup.o -b binary \
- memtest_shared.bin -o memtest.bin
+ memtest_shared.bin -o $@
reloc.o: reloc.c
- $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c
+reloc.o: CFLAGS += -fno-strict-aliasing
test.o: test.c
- $(CC) -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding test.c
+test.o: CFLAGS += -O0 -fno-PIC
random.o: random.c
- $(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding random.c
+random.o: CFLAGS += -O3 -fno-PIC
clean:
rm -f *.o *.s *.iso memtest.bin memtest memtest_shared \
|