.DELETE_ON_ERROR:
-# However, if $(way) is set then we have to define $(way_) and $(_way)
-# from it in the obvious fashion.
-# This must be done here (or earlier), but not in target.mk with the other
-# way management, because the pattern rules in this file take a snapshot of
-# the value of $(way_) and $(_way), and it's no good setting them later!
-
-ifneq "$(way)" ""
- way_ := $(way)_
- _way := _$(way)
-endif
-
#-----------------------------------------------------------------------------
# Haskell Suffix Rules
.PRECIOUS: %.gc
-%.hs : %.gc
- $(GREENCARD) $(GC_OPTS) $< -o $@
+%.hs %_stub_ffi.c %_stub_ffi.h : %.gc
+ $(GREENCARD) $(GC_OPTS) $<
%.lhs : %.gc
$(GREENCARD) $(GC_OPTS) $< -o $@
ifeq "$(UseGhcForCc)" "YES"
-$(odir_)%.$(way_)o : %.$(way_)s
+$(odir_)%.$(way_)o : %.c
@$(RM) $@
$(HC) $(GHC_CC_OPTS) -c $< -o $@
-$(odir_)%.$(way_)o : %.c
+$(odir_)%.$(way_)o : %.$(way_)s
@$(RM) $@
$(HC) $(GHC_CC_OPTS) -c $< -o $@
else
-$(odir_)%.$(way_)o : %.$(way_)s
- @$(RM) $@
- $(AS) $(AS_OPTS) -o $@ $<
-
$(odir_)%.$(way_)o : %.c
@$(RM) $@
$(CC) $(CC_OPTS) -c $< -o $@
+$(odir_)%.$(way_)o : %.$(way_)s
+ @$(RM) $@
+ $(AS) $(AS_OPTS) -o $@ $<
+
$(odir_)%.$(way_)o : %.S
@$(RM) $@
$(CC) $(CC_OPTS) -c $< -o $@
% : %.pp
@$(RM) $@
- $(CPP) $(CPP_OPTS) -x c $< | $(SED) -e '/^#/d' > $@
+ $(CPP) $(RAWCPP_FLAGS) $(CPP_OPTS) -x c $< | $(SED) -e '/^#/d' > $@