From: rrt Date: Thu, 12 Jul 2001 13:32:25 +0000 (+0000) Subject: [project @ 2001-07-12 13:32:25 by rrt] X-Git-Tag: Approximately_9120_patches~1572 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=9f3b6ad3eb33cf1a0e9036d2ef9d78ac47a18973 [project @ 2001-07-12 13:32:25 by rrt] Rewire so that hsc.c files get built as part of cbits library. --- diff --git a/mk/paths.mk b/mk/paths.mk index 8c9f036..9b13de7 100644 --- a/mk/paths.mk +++ b/mk/paths.mk @@ -119,7 +119,9 @@ DERIVED_SRCS = $(patsubst %.hsc, %.hs, $(HSC_SRCS)) \ EXCLUDED_HSC_SRCS = $(filter %.hsc, $(EXCLUDED_SRCS)) EXCLUDED_DERIVED_SRCS = $(patsubst %.hsc, %.hs, $(EXCLUDED_HSC_SRCS)) \ $(patsubst %.hsc, %_hsc.h, $(EXCLUDED_HSC_SRCS)) \ - $(patsubst %.hsc, %_hsc.c, $(EXCLUDED_HSC_SRCS)) + $(patsubst %.hsc, %_hsc.c, $(HSC_SRCS)) +# Exclude _hsc.c files; they get built as part of the cbits library, +# not part of the main library CLOSED_EXCLUDED_SRCS = $(sort $(EXCLUDED_SRCS) $(EXCLUDED_DERIVED_SRCS)) diff --git a/mk/target.mk b/mk/target.mk index 0f11536..5e8d60f 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -337,7 +337,7 @@ endif # # Outputs: # $(LIBRARY) the name of the library.a -# $(GHIC_LIBRARY) the name of the library.o (for GHCi0 +# $(GHIC_LIBRARY) the name of the library.o (for GHCi) # $(LIBOBJS) objects to put in library # $(STUBOBJS) more objects to put in library # @@ -349,6 +349,9 @@ ifneq "$(PACKAGE)" "" ifeq "$(IS_CBITS_LIB)" "YES" _cbits := _cbits +STUBOBJS += $(HSC_C_OBJS) +# Add _hsc.c files to the cbits library +SRCS += $(wildcard ../*_hsc.c) endif LIBRARY = libHS$(PACKAGE)$(_cbits)$(_way).a @@ -366,7 +369,6 @@ ifeq "$(LIBOBJS)" "" endif endif -STUBOBJS += $(HSC_C_OBJS) SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR) ifeq "$(IS_CBITS_LIB)" "YES"