[project @ 2003-12-04 18:25:51 by panne]
[haskell-directory.git] / cbits / Makefile
index 5b5979a..dd6a6ae 100644 (file)
@@ -1,15 +1,25 @@
-# $Id: Makefile,v 1.4 2002/02/06 10:40:26 simonmar Exp $
-
-UseGhcForCc = YES
+# $Id: Makefile,v 1.9 2003/10/20 13:16:58 simonmar Exp $
 
 TOP = ../..
 include $(TOP)/mk/boilerplate.mk
 
 HC = $(GHC_INPLACE)
 
+# If there is no system-supplied POSIX regex library, use our own
+ifneq "$(HavePosixRegex)" "YES"
+ALL_DIRS      += regex
+SRC_CC_OPTS   += -Iregex
+EXCLUDED_SRCS += regex/engine.c
+endif
+
 EXCLUDED_SRCS += ilxstubs.c
 
-SRC_CC_OPTS += -Wall -DCOMPILING_STDLIB -I$(GHC_RUNTIME_DIR)
+ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
+EXCLUDED_SRCS += consUtils.c
+endif
+
+SRC_CC_OPTS += -Wall -DCOMPILING_STDLIB 
+SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR) -I../include
 
 LIBRARY = libHSbase_cbits.a
 LIBOBJS = $(C_OBJS)