2 # Makefile for hslibs subdir
5 include $(TOP)/mk/boilerplate.mk
15 #-----------------------------------------------------------------------------
16 # Setting the standard variables
19 LIBRARY = libHSmisc$(_way).a
20 HS_SRCS = $(wildcard *.lhs)
22 # Remove Readline.lhs if readline.h isn't available.
23 ifneq "$(GhcLibsWithReadline)" "YES"
24 HS_SRCS := $(filter-out Readline.lhs,$(HS_SRCS))
26 SRC_HC_OPTS += -I$(ReadlineIncludePath)
29 HS_OBJS = $(HS_SRCS:.lhs=.$(way_)o)
31 HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi)
34 #-----------------------------------------------------------------------------
35 # Setting the GHC compile options
37 SRC_HC_OPTS += -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
41 WAY_p_HC_OPTS += -GPrelude
42 WAY_mr_HC_OPTS += -GPrelude
45 # Object and interface files have suffixes tagged with their ways
48 SRC_HC_OPTS += -hisuf $(way_)hi
54 BSD_HC_OPTS += -syslib posix -optc-DNON_POSIX_SOURCE
55 Socket_HC_OPTS += -I../std/cbits -optc-DNON_POSIX_SOURCE
56 SocketPrim_HC_OPTS += -I../std/cbits -H10m -syslib posix -optc-DNON_POSIX_SOURCE
58 #-----------------------------------------------------------------------------
59 # Dependency generation
61 SRC_MKDEPENDHS_OPTS += -syslib posix -I$(GHC_INCLUDE_DIR)
63 #-----------------------------------------------------------------------------
64 # Installation; need to install .hi files as well as libraries
66 # The interface files are put inside the $(libdir), since they
67 # might (potentially) be platform specific..
69 # override is used here because for binary distributions, datadir is
70 # set on the command line. sigh.
72 override datadir:=$(libdir)/imports/misc
75 # Files to install from here
77 INSTALL_LIBS += $(LIBRARY)
78 INSTALL_DATAS += $(HS_IFACES)
80 include $(TOP)/mk/target.mk