1 # $Id: Makefile,v 1.10 1998/12/02 13:26:38 simonm 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
37 #-----------------------------------------------------------------------------
38 # Setting the GHC compile options
40 SRC_HC_OPTS += -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
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
57 BSD_HC_OPTS += -I../std/cbits -optc-DNON_POSIX_SOURCE
58 Socket_HC_OPTS += -I../std/cbits -optc-DNON_POSIX_SOURCE
59 SocketPrim_HC_OPTS += -I../std/cbits -H10m -optc-DNON_POSIX_SOURCE
60 PackedString_HC_OPTS += -H12m
62 #-----------------------------------------------------------------------------
63 # Dependency generation
65 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
67 #-----------------------------------------------------------------------------
68 # Installation; need to install .hi files as well as libraries
70 # The interface files are put inside the $(libdir), since they
71 # might (potentially) be platform specific..
73 # override is used here because for binary distributions, datadir is
74 # set on the command line. sigh.
76 override datadir:=$(libdir)/imports/misc
79 # Files to install from here
81 INSTALL_LIBS += $(LIBRARY)
82 INSTALL_DATAS += $(HS_IFACES)
84 include $(TOP)/mk/target.mk