summaryrefslogtreecommitdiff
path: root/rules.mk
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-12-15 23:38:34 +0100
committerWolfgang Denk <wd@denx.de>2009-12-15 23:38:34 +0100
commitbb3bcfa2426cc6a0aecec7270e3ee67ca843a125 (patch)
tree0314e3d8e8d9e4d568a496fca27db33d66e68bb4 /rules.mk
parenta200a7c04d89853d2a1395b96d8ca5e3dd754551 (diff)
parent4b142febff71eabdb7ddbb125c7b583b24ddc434 (diff)
downloadu-boot-imx-bb3bcfa2426cc6a0aecec7270e3ee67ca843a125.zip
u-boot-imx-bb3bcfa2426cc6a0aecec7270e3ee67ca843a125.tar.gz
u-boot-imx-bb3bcfa2426cc6a0aecec7270e3ee67ca843a125.tar.bz2
Merge branch 'next' of ../next
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/rules.mk b/rules.mk
index 6f999dd..c1670ac 100644
--- a/rules.mk
+++ b/rules.mk
@@ -25,11 +25,20 @@
_depend: $(obj).depend
-$(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(SRCS)
+$(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(SRCS) $(HOSTSRCS)
@rm -f $@
@for f in $(SRCS); do \
g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
- $(CC) -M $(HOSTCFLAGS) $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
+ $(CC) -M $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
done
+ @for f in $(HOSTSRCS); do \
+ g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
+ $(HOSTCC) -M $(HOSTCPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
+ done
+
+$(HOSTOBJS): $(obj)%.o: %.c
+ $(HOSTCC) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c
+$(NOPEDOBJS): $(obj)%.o: %.c
+ $(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c
#########################################################################