Rev 418 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 418 | Rev 420 | ||
---|---|---|---|
- | 1 | BINUTILS_DIR=/usr/local/sparc64/bin |
|
- | 2 | TARGET=sparc64-linux-gnu |
|
- | 3 | ||
1 | .PHONY: nothing build clean |
4 | .PHONY: nothing build |
2 | 5 | ||
3 | nothing: |
6 | nothing: |
4 | 7 | ||
5 | build: |
8 | build: boot.bin |
- | 9 | cp boot.bin ../../../load.bin |
|
- | 10 | ||
- | 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 |
|
- | 20 | dd if=/dev/zero of=$@ bs=512 count=16 |
|
- | 21 | dd if=boot.aout of=$@ bs=512 seek=1 conv=notrunc |
|
- | 22 | ||
- | 23 | boot.aout: boot.o |
|
- | 24 | $(LD) $(LFLAGS) boot.o -o $@ |
|
- | 25 | ||
6 | touch boot.bin |
26 | boot.o: boot.S |
- | 27 | $(CC) $(CFLAGS) -c boot.S -o $@ |
|
7 | 28 | ||
8 | clean: |
29 | clean: |
9 | -rm *.bin |
30 | -rm *.o *.bin *.aout |
10 | 31 |