# Add _hsc.c files to the cbits library
C_SRCS += $(wildcard ../*_hsc.c)
# Make .hsc.h include files from the directory above visible
-SRC_CC_OPTS += -I..
+# (and the cbits/ library too).
+SRC_CC_OPTS += -I.. -I.
endif
+ifneq "$(way)" "i"
LIBRARY = libHS$(PACKAGE)$(_cbits)$(_way).a
GHCI_LIBRARY = HS$(PACKAGE)$(_cbits)$(_way).o
+else
+LIBRARY = $(PACKAGE).dll
+endif
ifneq "$(IS_CBITS_LIB)" "YES"
WAYS=$(GhcLibWays)
endif
endif
-SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR)
-
ifeq "$(IS_CBITS_LIB)" "YES"
override datadir:=$(libdir)/include
INSTALL_DATAS += Hs$(shell perl -e 'print ucfirst "$(PACKAGE)"').h
ifneq "$(LIBRARY)" ""
all :: $(LIBRARY)
+ifneq "$(way)" "i"
define BUILD_LIB
$(RM) $@
$(AR) $(AR_OPTS) $@ $(STUBOBJS) $(LIBOBJS)
$(RANLIB) $@
endef
+else
+define BUILD_LIB
+$(RM) $@
+al -out:$@ $(STUBOBJS) $(LIBOBJS)
+endef
+endif
#
# For Haskell object files, we might have chosen to split