Rev 3022 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3022 | Rev 4055 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | LIBC_PREFIX = ../../lib/libc |
1 | LIBC_PREFIX = ../../lib/libc |
2 | SOFTINT_PREFIX = ../../lib/softint |
2 | SOFTINT_PREFIX = ../../lib/softint |
- | 3 | ||
3 | include $(LIBC_PREFIX)/Makefile.toolchain |
4 | include $(LIBC_PREFIX)/Makefile.toolchain |
4 | 5 | ||
5 | LIBS = $(LIBC_PREFIX)/libc.a |
6 | LIBS = $(LIBC_PREFIX)/libc.a |
6 | 7 | ||
7 | OUTPUT = tetris |
8 | OUTPUT = tetris |
8 | SOURCES = shapes.c scores.c input.c tetris.c screen.c |
9 | SOURCES = shapes.c scores.c input.c tetris.c screen.c |
9 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
10 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
10 | 11 | ||
11 | .PHONY: all clean depend disasm |
12 | .PHONY: all clean depend disasm |
12 | 13 | ||
13 | all: $(OUTPUT) disasm |
14 | all: $(OUTPUT) $(OUTPUT).disasm |
14 | 15 | ||
15 | -include Makefile.depend |
16 | -include Makefile.depend |
16 | 17 | ||
17 | depend: |
18 | depend: |
18 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
19 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
19 | 20 | ||
20 | $(OUTPUT): $(OBJECTS) $(LIBS) |
21 | $(OUTPUT): $(OBJECTS) $(LIBS) |
21 | $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
22 | $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
22 | 23 | ||
23 | clean: |
24 | clean: |
24 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend *.o |
25 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend *.o |
- | 26 | ||
25 | disasm: |
27 | disasm: $(OUTPUT).disasm |
- | 28 | ||
- | 29 | $(OUTPUT).disasm: $(OUTPUT) |
|
26 | $(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm |
30 | $(OBJDUMP) -d $< >$@ |
27 | 31 | ||
28 | %.o: %.S |
32 | %.o: %.S |
29 | $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
33 | $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
30 | 34 | ||
31 | %.o: %.s |
35 | %.o: %.s |