1 # $Id: Makefile,v 1.18 1999/09/17 10:43:52 sof Exp $
3 # Makefile for miscellaneous libraries.
7 include $(TOP)/mk/boilerplate.mk
17 #-----------------------------------------------------------------------------
18 # Setting the standard variables
21 LIBRARY = libHSmisc$(_way).a
23 ifeq "$(EnableWin32DLLs)" "YES"
24 HS_SRCS := $(filter-out Select.lhs,$(HS_SRCS))
27 # Remove Readline.lhs if readline.h isn't available.
28 ifneq "$(GhcLibsWithReadline)" "YES"
29 HS_SRCS := $(filter-out Readline.lhs,$(HS_SRCS))
31 ifneq "$(ReadlineIncludePath)" ""
32 SRC_HC_OPTS += -I$(ReadlineIncludePath)
36 HS_OBJS = $(HS_SRCS:.lhs=.$(way_)o)
38 HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi)
39 SRC_MKDEPENDHS_OPTS += -optdep--include-prelude
41 #-----------------------------------------------------------------------------
42 # Setting the GHC compile options
44 SRC_HC_OPTS += -i../concurrent:../posix -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
48 # (what's this stuff doing here?)
49 WAY_p_HC_OPTS += -GPrelude
50 WAY_mr_HC_OPTS += -GPrelude
53 # Object and interface files have suffixes tagged with their ways
56 SRC_HC_OPTS += -hisuf $(way_)hi
60 SRC_HC_OPTS += -static
67 BSD_HC_OPTS += -I../std/cbits -H8m -optc-DNON_POSIX_SOURCE
68 Socket_HC_OPTS += -I../std/cbits -optc-DNON_POSIX_SOURCE
69 SocketPrim_HC_OPTS += -I../std/cbits -H12m -optc-DNON_POSIX_SOURCE
70 PackedString_HC_OPTS += -H12m
71 Native_HC_OPTS += -H8m
72 Pretty_HC_OPTS += -H8m
74 #-----------------------------------------------------------------------------
75 # Dependency generation
77 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
79 #-----------------------------------------------------------------------------
83 DLL_IMPLIB_NAME = libHSmisc_imp.a
84 SRC_BLD_DLL_OPTS += --export-all --output-def=HSmisc.def
85 SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lHScbits_imp -lHSmisc_cbits_imp -lHS_imp -lHSexts_imp -lgmp -L. -L../../rts/gmp -L../../rts -L../std -L../std/cbits -L../exts -Lcbits
88 #-----------------------------------------------------------------------------
89 # Installation; need to install .hi files as well as libraries
91 # The interface files are put inside the $(libdir), since they
92 # might (potentially) be platform specific..
94 # override is used here because for binary distributions, datadir is
95 # set on the command line. sigh.
97 override datadir:=$(libdir)/imports/misc
100 # Files to install from here
102 INSTALL_LIBS += $(LIBRARY)
103 INSTALL_DATAS += $(HS_IFACES)
105 ifeq "$(EnableWin32DLLs)" "YES"
106 INSTALL_PROGS += $(DLL_NAME)
107 INSTALL_LIBS += $(patsubst %.a, %_imp.a, $(LIBRARY))
108 INSTALL_DATAS += dLL_ifs.hi
111 include $(TOP)/mk/target.mk