2 # Makefile for hslibs subdir
5 include $(TOP)/mk/boilerplate.mk
15 #-----------------------------------------------------------------------------
16 # Setting the standard variables
19 LIBRARY = libHSposix$(_way).a
20 HS_SRCS = $(wildcard *.lhs)
22 HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi) GHC.$(way_)hi
24 #-----------------------------------------------------------------------------
25 # Setting the GHC compile options
27 SRC_HC_OPTS += -i../misc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
31 WAY_p_HC_OPTS += -GPrelude
32 WAY_mr_HC_OPTS += -GPrelude
35 # Object and interface files have suffixes tagged with their ways
38 SRC_HC_OPTS += -hisuf $(way_)hi
44 PosixUtil_HC_OPTS ='-\#include"cbits/libposix.h"' -monly-3-regs
45 PosixDB_HC_OPTS ='-\#include"cbits/libposix.h"'
46 PosixErr_HC_OPTS ='-\#include"cbits/libposix.h"'
47 PosixFiles_HC_OPTS ='-\#include"cbits/libposix.h"'
48 PosixIO_HC_OPTS ='-\#include"cbits/libposix.h"'
49 PosixProcEnv_HC_OPTS ='-\#include"cbits/libposix.h"'
50 PosixProcPrim_HC_OPTS ='-\#include"cbits/libposix.h"'
51 PosixTTY_HC_OPTS ='-\#include"cbits/libposix.h"' -monly-2-regs
52 Posix_HC_OPTS ='-\#include"cbits/libposix.h"'
54 #-----------------------------------------------------------------------------
55 # Dependency generation
57 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
59 #-----------------------------------------------------------------------------
60 # Installation; need to install .hi files as well as libraries
62 # The interface files are put inside the $(libdir), since they
63 # might (potentially) be platform specific..
65 # override is used here because for binary distributions, datadir is
66 # set on the command line. sigh.
68 override datadir:=$(libdir)/imports/posix
71 # Files to install from here
73 INSTALL_LIBS += $(LIBRARY)
74 INSTALL_DATAS += $(HS_IFACES)
76 include $(TOP)/mk/target.mk