1 # $Id: Makefile,v 1.20 2000/05/31 12:04:49 panne Exp $
4 include $(TOP)/mk/boilerplate.mk
8 ifeq "$(filter dll,$(WAYS))" "dll"
14 LIBRARY=libHSstd_cbits$(_way).a
16 C_SRCS= $(wildcard *.c)
18 C_OBJS = $(C_SRCS:.c=.$(way_)o)
20 SRC_CC_OPTS += -O -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR) $(GhcLibCcOpts) -Wall
23 SRC_CC_OPTS += -static
27 all :: DllVersionInfo.o
29 $(DLL_NAME) : DllVersionInfo.o
32 DLL_NAME = HSstd_cbits.dll
33 DLL_IMPLIB_NAME = libHSstd_cbits_imp.a
34 DLL_DESCRIPTION = "Haskell Prelude helpers"
35 SRC_BLD_DLL_OPTS += --export-all --output-def=HSstdcbits.def DllVersionInfo.o
36 SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lgmp -L. -L../../../rts/gmp -L../../../rts
39 # Compile the files using the Haskell compiler (ghc really).
43 # ghc-inplace needs access to HsStd.h and its includes, so copy them into the
45 # NOTE 1: Installation of the header files into their final place is done via
46 # GHC_INCLUDE_DIR. This is not nice, but there is no easy way out.
47 # NOTE 2: Filtering out timezone.h is a little bit hacky, but we don't need it
50 cp $(filter-out timezone.h,$(wildcard *.h)) $(GHC_INCLUDE_DIR)
52 CLEAN_FILES += $(foreach header_file, $(filter-out timezone.h,$(wildcard *.h)), $(GHC_INCLUDE_DIR)/$(header_file))
54 SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
56 # -----------------------------------------------------------------------------
59 INSTALL_LIBS+=$(LIBRARY)
61 ifeq "$(EnableWin32DLLs)" "YES"
62 INSTALL_PROGS += $(DLL_NAME)
64 INSTALL_LIBS += $(patsubst %.a, %_imp.a, $(LIBRARY))
68 include $(TOP)/mk/target.mk