2 # Makefile for cbits subdirectory
5 include $(TOP)/mk/boilerplate.mk
10 C_SRCS=$(wildcard *.c)
12 # Remove Readline.lhs if readline.h isn't available.
13 ifneq "$(HAVE_READLINE)" "YES"
14 C_SRCS := $(filter-out ghcReadline.c,$(C_SRCS))
17 ifeq "$(EnableWin32DLLs)" "YES"
18 C_SRCS := $(filter-out selectFrom.c,$(C_SRCS))
22 SRC_CC_OPTS += -static
25 SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
26 SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_LIB_DIR)/std/cbits
28 LIBRARY=libHSmisc_cbits.a
30 INSTALL_LIBS += $(LIBRARY)
32 DLL_NAME = HSmisc_cbits.dll
33 SRC_BLD_DLL_OPTS += --export-all --output-def=HSmisc_cbits.def
34 SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lHScbits_imp -lgmp -L. -L../../../rts/gmp -L../../../rts -L../../std/cbits
36 ifeq "$(EnableWin32DLLs)" "YES"
37 INSTALL_PROGS += $(DLL_NAME)
38 INSTALL_LIBS += $(patsubst %.a, %_imp.a, $(LIBRARY))
41 include $(TOP)/mk/target.mk