Rev | Line | |
---|
[7] | 1 | LD=mipsel-unknown-elf-ld |
---|
| 2 | CC=mipsel-unknown-elf-gcc |
---|
| 3 | AS=mipsel-unknown-elf-as |
---|
| 4 | DU=mipsel-unknown-elf-objdump |
---|
| 5 | |
---|
| 6 | OBJS= reset.o \ |
---|
| 7 | giet.o \ |
---|
| 8 | stdio.o \ |
---|
| 9 | drivers.o \ |
---|
| 10 | main.o |
---|
| 11 | |
---|
| 12 | CFLAGS= -Wall -ffreestanding -fomit-frame-pointer -mips32 -ggdb |
---|
| 13 | ifeq ($(GIET),) |
---|
| 14 | $(error "You must define $$(GIET)") |
---|
| 15 | endif |
---|
| 16 | |
---|
| 17 | bin.soft: $(OBJS) ldscript |
---|
| 18 | $(LD) -o $@ -T ldscript $(OBJS) |
---|
| 19 | $(DU) -D $@ > $@.txt |
---|
| 20 | |
---|
| 21 | reset.o: reset.s |
---|
| 22 | $(AS) -g -mips32 -o $@ $< |
---|
| 23 | giet.o: $(GIET)/giet.s |
---|
| 24 | $(AS) -g -mips32 -o $@ $< |
---|
| 25 | |
---|
| 26 | drivers.o: $(GIET)/drivers.c |
---|
| 27 | $(CC) $(CFLAGS) -c -o $@ $< |
---|
| 28 | stdio.o: $(GIET)/stdio.c |
---|
| 29 | $(CC) $(CFLAGS) -c -o $@ $< |
---|
| 30 | |
---|
| 31 | main.o: main.c |
---|
| 32 | $(CC) $(CFLAGS) -I$(GIET) -c -o $@ $< |
---|
| 33 | |
---|
| 34 | clean: |
---|
| 35 | rm -f *.o bin.soft *.txt core *~ |
---|
| 36 | |
---|
Note: See
TracBrowser
for help on using the repository browser.