Rev 420 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 420 | Rev 455 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | BINUTILS_DIR=/usr/local/sparc64/bin |
- | |
2 | TARGET=sparc64-linux-gnu |
1 | .PHONY: build clean |
3 | 2 | ||
4 | .PHONY: nothing build |
3 | CFLAGS = -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -I../include |
5 | - | ||
6 | nothing: |
- | |
7 | 4 | ||
8 | build: boot.bin |
5 | build: boot.bin |
9 | cp boot.bin ../../../load.bin |
6 | cp boot.bin ../../../load.bin |
10 | 7 | ||
11 | CC=$(BINUTILS_DIR)/$(TARGET)-gcc |
- | |
12 | AS=$(BINUTILS_DIR)/$(TARGET)-as |
- | |
13 | LD=$(BINUTILS_DIR)/$(TARGET)-ld |
- | |
14 | - | ||
15 | CPPFLAGS=$(DEFS) -nostdinc -I../include |
- | |
16 | CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O2 |
- | |
17 | LFLAGS=-no-check-sections -N -T _link.ld -s |
- | |
18 | - | ||
19 | boot.bin: boot.aout |
8 | boot.bin: boot.a.out |
20 | dd if=/dev/zero of=$@ bs=512 count=16 |
9 | dd if=/dev/zero of=$@ bs=512 count=16 |
21 | dd if=boot.aout of=$@ bs=512 seek=1 conv=notrunc |
10 | dd if=boot.a.out of=$@ bs=512 seek=1 conv=notrunc |
22 | 11 | ||
23 | boot.aout: boot.o |
12 | boot.a.out: boot.o |
24 | $(LD) $(LFLAGS) boot.o -o $@ |
13 | $(LD) -no-check-sections -N -T _link.ld -s boot.o -o $@ |
25 | 14 | ||
26 | boot.o: boot.S |
15 | boot.o: boot.S |
27 | $(CC) $(CFLAGS) -c boot.S -o $@ |
16 | $(CC) $(CFLAGS) -c boot.S -o $@ |
28 | 17 | ||
29 | clean: |
18 | clean: |
30 | -rm *.o *.bin *.aout |
19 | -rm -f boot.o boot.a.out boot.bin ../../../load.bin |