1 # $Id: Makefile,v 1.16 1999/06/25 10:23:08 panne Exp $
3 # Makefile for miscellaneous libraries.
7 include $(TOP)/mk/boilerplate.mk
17 #-----------------------------------------------------------------------------
18 # Setting the standard variables
21 LIBRARY = libHSmisc$(_way).a
22 HS_SRCS = $(wildcard *.lhs)
24 # Remove Readline.lhs if readline.h isn't available.
25 ifneq "$(GhcLibsWithReadline)" "YES"
26 HS_SRCS := $(filter-out Readline.lhs,$(HS_SRCS))
28 SRC_HC_OPTS += -I$(ReadlineIncludePath)
31 HS_OBJS = $(HS_SRCS:.lhs=.$(way_)o)
33 HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi)
34 SRC_MKDEPENDHS_OPTS += -optdep--include-prelude
36 #-----------------------------------------------------------------------------
37 # Setting the GHC compile options
39 SRC_HC_OPTS += -i../concurrent:../posix -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
43 # (what's this stuff doing here?)
44 WAY_p_HC_OPTS += -GPrelude
45 WAY_mr_HC_OPTS += -GPrelude
48 # Object and interface files have suffixes tagged with their ways
51 SRC_HC_OPTS += -hisuf $(way_)hi
55 SRC_HC_OPTS += -static
62 BSD_HC_OPTS += -I../std/cbits -H8m -optc-DNON_POSIX_SOURCE
63 Socket_HC_OPTS += -I../std/cbits -optc-DNON_POSIX_SOURCE
64 SocketPrim_HC_OPTS += -I../std/cbits -H12m -optc-DNON_POSIX_SOURCE
65 PackedString_HC_OPTS += -H12m
66 Native_HC_OPTS += -H8m
67 Pretty_HC_OPTS += -H8m
69 #-----------------------------------------------------------------------------
70 # Dependency generation
72 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
74 #-----------------------------------------------------------------------------
78 DLL_IMPLIB_NAME = libHSmisc_imp.a
79 SRC_BLD_DLL_OPTS += --export-all --output-def=HSmisc.def
80 SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lHS_cbits_imp -lHSmisc_cbits_imp -lHS_imp -lHSexts_imp -lgmp -L. -L../../rts/gmp -L../../rts -L../std -L../std/cbits -L../exts -Lcbits
83 #-----------------------------------------------------------------------------
84 # Installation; need to install .hi files as well as libraries
86 # The interface files are put inside the $(libdir), since they
87 # might (potentially) be platform specific..
89 # override is used here because for binary distributions, datadir is
90 # set on the command line. sigh.
92 override datadir:=$(libdir)/imports/misc
95 # Files to install from here
97 INSTALL_LIBS += $(LIBRARY)
98 INSTALL_DATAS += $(HS_IFACES)
100 include $(TOP)/mk/target.mk