[project @ 2003-03-20 15:56:31 by simonmar]
[ghc-hetmet.git] / mk / target.mk
index baaaeb3..2cb9d0f 100644 (file)
@@ -44,6 +44,11 @@ PRE_SRCS := $(ALL_SRCS)
 
 include $(TOP)/mk/package.mk
 
+###################################################################
+# Suffix rules for Haskell, C and literate 
+
+include $(TOP)/mk/suffix.mk
+
 ##################################################################
 #              FPtools standard targets
 #
@@ -238,9 +243,6 @@ else
 $(HS_PROG) :: $(HS_OBJS)
        $(CC) -o $@ $(HC_BOOT_CC_OPTS) $(HC_BOOT_LD_OPTS) $(HS_OBJS) $(HC_BOOT_LIBS)
 endif
-
-# for building a Haskell program, we add FptoolsHcOpts
-SRC_HC_OPTS += $(FptoolsHcOpts)
 endif
 
 #----------------------------------------
@@ -302,14 +304,14 @@ SRC_HC_OPTS += -split-objs
 ifeq "$(ArSupportsInput)" ""
 define BUILD_LIB
 $(RM) $@ $@.tmp
-(echo $(STUBOBJS) $(EXTRA_OBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') | xargs ar q $@
+(echo $(STUBOBJS) $(C_OBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') | xargs $(AR) $@
 $(RANLIB) $@
 endef
 else
 define BUILD_LIB
 $(RM) $@ $@.tmp
-echo $(STUBOBJS)    > $@.list
-echo $(EXTRA_OBJS) >> $@.list
+echo $(STUBOBJS) > $@.list
+echo $(C_OBJS) >> $@.list
 $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o' >> $@.list
 $(AR) $(AR_OPTS) $@ $(ArSupportsInput) $@.list
 $(RM) $@.list
@@ -1117,7 +1119,7 @@ endif
 # the --no-print-directory flag which is passed to recursive
 # invocations of make.
 #
-ifeq "$(way)" ""
+#ifeq "$(way)" ""
 ifneq "$(SUBDIRS)" ""
 
 # we override the 'boot', 'all' and 'install' targets in the top
@@ -1164,7 +1166,7 @@ $(ALL_TARGET) docs runtests $(BOOT_TARGET) TAGS clean distclean mostlyclean main
        @echo "------------------------------------------------------------------------"
 
 endif
-endif
+#endif
 
 #
 # Selectively building subdirectories.