Rev 504 | Rev 805 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 504 | Rev 795 | ||
---|---|---|---|
Line 50... | Line 50... | ||
50 | GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
50 | GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
51 | ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
51 | ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
52 | 52 | ||
53 | .PHONY: all clean depend |
53 | .PHONY: all clean depend |
54 | 54 | ||
55 | all: libc.a _link.ld |
55 | all: libc.a arch/$(ARCH)/_link.ld |
56 | 56 | ||
57 | -include Makefile.depend |
57 | -include Makefile.depend |
58 | 58 | ||
59 | clean: |
59 | clean: |
60 | -rm -f libc.a _link.ld Makefile.depend |
60 | -rm -f libc.a arch/$(ARCH)/_link.ld Makefile.depend |
61 | find generic/ arch/$(ARCH)/ -name '*.o' -follow -exec rm \{\} \; |
61 | find generic/ arch/$(ARCH)/ -name '*.o' -follow -exec rm \{\} \; |
62 | 62 | ||
63 | depend: |
63 | depend: |
64 | $(CC) $(DEFS) $(CFLAGS) -M $(ARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend |
64 | $(CC) $(DEFS) $(CFLAGS) -M $(ARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend |
65 | 65 | ||
66 | libc.a: depend $(ARCH_OBJECTS) $(GENERIC_OBJECTS) |
66 | libc.a: depend $(ARCH_OBJECTS) $(GENERIC_OBJECTS) |
67 | $(AR) rc libc.a $(ARCH_OBJECTS) $(GENERIC_OBJECTS) |
67 | $(AR) rc libc.a $(ARCH_OBJECTS) $(GENERIC_OBJECTS) |
68 | 68 | ||
69 | _link.ld: _link.ld.in |
69 | arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in |
70 | $(CC) $(DEFS) $(CFLAGS) -E -x c $< | grep -v "^\#" > $@ |
70 | $(CC) $(DEFS) $(CFLAGS) -E -x c $< | grep -v "^\#" > $@ |
71 | 71 | ||
72 | %.o: %.S |
72 | %.o: %.S |
73 | $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
73 | $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
74 | 74 |