Rev 455 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 455 | Rev 457 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | MIPS_BINUTILS_DIR=/usr/local/mipsel/bin |
- | |
2 | MIPS_TARGET=mipsel-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 -mips3 -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 | AS=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-as |
- | |
12 | CC=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-gcc |
- | |
13 | LD=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-ld |
- | |
14 | - | ||
15 | AFLAGS=-mips2 -I../../../generic/include |
- | |
16 | LFLAGS=--oformat=binary -e start -T _link.ld |
- | |
17 | - | ||
18 | .S.o: |
- | |
19 | $(CC) $(ASFLAGS) -c -o $@ $< |
- | |
20 | - | ||
21 | boot.bin: boot.o |
8 | boot.bin: boot.o |
22 | $(LD) $(LFLAGS) $< -o $@ |
9 | $(LD) -e start -T _link.ld boot.o -o $@ |
23 | 10 | ||
- | 11 | boot.o: boot.S |
|
- | 12 | $(CC) $(CFLAGS) -c boot.S -o $@ |
|
24 | 13 | ||
25 | clean: |
14 | clean: |
26 | -rm *.o *.bin |
15 | -rm -f boot.o boot.bin ../../../load.bin |