[project @ 1999-09-17 10:43:51 by sof]
[ghc-hetmet.git] / ghc / lib / misc / cbits / Makefile
1 #
2 # Makefile for cbits subdirectory
3 #
4 TOP=../../..
5 include $(TOP)/mk/boilerplate.mk
6 override WAYS=
7
8 CC:=$(HC)
9
10 C_SRCS=$(wildcard *.c)
11
12 # Remove Readline.lhs if readline.h isn't available.
13 ifneq "$(HAVE_READLINE)" "YES"
14   C_SRCS := $(filter-out ghcReadline.c,$(C_SRCS))
15 endif
16
17 ifeq "$(EnableWin32DLLs)" "YES"
18   C_SRCS := $(filter-out selectFrom.c,$(C_SRCS))
19 endif
20
21 ifneq "$(way)" "dll"
22 SRC_CC_OPTS += -static
23 endif
24
25 SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
26 SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_LIB_DIR)/std/cbits
27
28 LIBRARY=libHSmisc_cbits.a
29 LIBOBJS=$(C_OBJS)
30 INSTALL_LIBS += $(LIBRARY)
31
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
35
36 ifeq "$(EnableWin32DLLs)" "YES"
37 INSTALL_PROGS  += $(DLL_NAME)
38 INSTALL_LIBS += $(patsubst %.a, %_imp.a, $(LIBRARY))
39 endif
40
41 include $(TOP)/mk/target.mk