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