Rev 3569 | Rev 4342 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4340 | svoboda | 1 | -include ../../../Makefile.config |
3569 | svoboda | 2 | |
2479 | jermar | 3 | LIBC_PREFIX = ../../lib/libc |
4 | SOFTINT_PREFIX = ../../lib/softint |
||
3560 | svoboda | 5 | RTLD_PREFIX = ../../lib/rtld |
1449 | palkovsky | 6 | include $(LIBC_PREFIX)/Makefile.toolchain |
3560 | svoboda | 7 | include $(LIBC_PREFIX)/Makefile.app |
1419 | jermar | 8 | |
1449 | palkovsky | 9 | OUTPUT = tetris |
1466 | palkovsky | 10 | SOURCES = shapes.c scores.c input.c tetris.c screen.c |
1449 | palkovsky | 11 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
1419 | jermar | 12 | |
1449 | palkovsky | 13 | .PHONY: all clean depend disasm |
14 | |||
3211 | svoboda | 15 | all: $(OUTPUT) $(OUTPUT).disasm |
1449 | palkovsky | 16 | |
17 | -include Makefile.depend |
||
18 | |||
19 | depend: |
||
20 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
||
21 | |||
22 | $(OUTPUT): $(OBJECTS) $(LIBS) |
||
3560 | svoboda | 23 | $(LD) -T $(LD_SCRIPT) $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
1449 | palkovsky | 24 | |
25 | clean: |
||
26 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend *.o |
||
27 | |||
3211 | svoboda | 28 | disasm: $(OUTPUT).disasm |
29 | |||
30 | $(OUTPUT).disasm: $(OUTPUT) |
||
31 | $(OBJDUMP) -d $< >$@ |
||
32 | |||
1449 | palkovsky | 33 | %.o: %.S |
34 | $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
||
35 | |||
36 | %.o: %.s |
||
37 | $(AS) $(AFLAGS) $< -o $@ |
||
38 | |||
39 | %.o: %.c |
||
40 | $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ |