summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/Makefile.inc
diff options
context:
space:
mode:
authorIngo Albrecht <prom@berlin.ccc.de>2010-03-07 02:28:22 +0100
committerHarald Welte <laforge@gnumonks.org>2010-03-07 11:47:10 +0100
commita8c2ed42ee7ff517250c6acd68bcd1eb65828c56 (patch)
tree57528cb17289d0865d5cfff75d5282ca544aa334 /src/target/firmware/Makefile.inc
parent2ff5ca0458432fd2ca830301a24f94a71b02e2cb (diff)
Fixed firmware buildsys dependencies.
Diffstat (limited to 'src/target/firmware/Makefile.inc')
-rw-r--r--src/target/firmware/Makefile.inc16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/target/firmware/Makefile.inc b/src/target/firmware/Makefile.inc
index 934b95fc..9a6a4d04 100644
--- a/src/target/firmware/Makefile.inc
+++ b/src/target/firmware/Makefile.inc
@@ -66,8 +66,8 @@ $(1)_OBJS:=$$($(1)_SRCS_REL:.c=.o)
$(1)_OBJS:=$$($(1)_OBJS:.S=.o)
$(1).elf $(1).map $(1).size: apps/$(1)/main.o $(ANY_APP_OBJS) $(ANY_APP_LIBS)
- $(CROSS_COMPILE)$(LD) $(LDFLAGS) -T $(LDS) -Bstatic -Map $$(@:.elf=.map) -o $$@ --start-group $$^ --end-group
- $(CROSS_COMPILE)$(SIZE) $$@ | tee $(1).size
+ $(CROSS_COMPILE)$(LD) $(LDFLAGS) -T $(LDS) -Bstatic -Map $(1).map -o $(1).elf --start-group $$^ --end-group
+ $(CROSS_COMPILE)$(SIZE) $(1).elf | tee $(1).size
ALL_APPS+=$(1).elf
@@ -115,20 +115,18 @@ depend: $(ALL_DEPS)
#### COMPILATION RULES ####
%.P: %.c
- @$(CROSS_COMPILE)$(CC) $(CFLAGS) -M -o $(*).d $(<)
- @sed 's|\($*)\)\.o[ :]*|\1.o $@ : |g' < $*.d > $@; \
- rm -f $*.d; [ -s $@ ] || rm -f $@
+ $(CROSS_COMPILE)$(CC) $(CFLAGS) -M -o $(*).d $(<)
+ sed 's|.*\.o:|$(@:.P=.o): |g' < $*.d > $@; rm -f $*.d; [ -s $@ ] || rm -f $@
%.P: %.S
@$(CROSS_COMPILE)$(CC) $(ASFLAGS) -M -o $(*).d $(<)
- @sed 's|\($*)\)\.o[ :]*|\1.o $@ : |g' < $*.d > $@; \
- rm -f $*.d; [ -s $@ ] || rm -f $@
+ sed 's|.*\.o:|$(@:.P=.o): |g' < $*.d > $@; rm -f $*.d; [ -s $@ ] || rm -f $@
%.o: %.c
- $(CROSS_COMPILE)$(CC) $(CFLAGS) -c -o $@ $^
+ $(CROSS_COMPILE)$(CC) $(CFLAGS) -c -o $@ $<
%.o: %.S
- $(CROSS_COMPILE)$(CC) $(ASFLAGS) -c -o $@ $^
+ $(CROSS_COMPILE)$(CC) $(ASFLAGS) -c -o $@ $<
%.bin: %.elf