Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4677 | trochtova | 1 | LIBC_PREFIX = ../../lib/libc |
2 | SOFTINT_PREFIX = ../../lib/softint |
||
3 | |||
4 | include $(LIBC_PREFIX)/Makefile.toolchain |
||
5 | |||
6 | LIBS = $(LIBC_PREFIX)/libc.a |
||
7 | |||
8 | OUTPUT = shutters |
||
9 | SOURCES = shutters.c |
||
10 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
||
11 | |||
12 | .PHONY: all clean depend disasm |
||
13 | |||
14 | all: $(OUTPUT) $(OUTPUT).disasm |
||
15 | |||
16 | -include Makefile.depend |
||
17 | |||
18 | depend: |
||
19 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
||
20 | |||
21 | $(OUTPUT): $(OBJECTS) $(LIBS) |
||
22 | $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
||
23 | |||
24 | clean: |
||
25 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend *.o |
||
26 | |||
27 | disasm: $(OUTPUT).disasm |
||
28 | |||
29 | $(OUTPUT).disasm: $(OUTPUT) |
||
30 | $(OBJDUMP) -d $< >$@ |
||
31 | |||
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 $@ |