summaryrefslogtreecommitdiff
path: root/rules.mk
diff options
context:
space:
mode:
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
#########################################################################