2 # $Id: Makefile,v 1.6 1999/05/11 16:47:46 keithw Exp $
4 # Makefile for POSIX library
8 include $(TOP)/mk/boilerplate.mk
18 #-----------------------------------------------------------------------------
19 # Setting the standard variables
22 LIBRARY = libHSposix$(_way).a
23 HS_SRCS = $(wildcard *.lhs)
25 HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi)
26 SRC_MKDEPENDHS_OPTS += -optdep--include-prelude
28 #-----------------------------------------------------------------------------
29 # Setting the GHC compile options
31 SRC_HC_OPTS += -i../misc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
35 WAY_p_HC_OPTS += -GPrelude
36 WAY_mr_HC_OPTS += -GPrelude
39 # Object and interface files have suffixes tagged with their ways
42 SRC_HC_OPTS += -hisuf $(way_)hi
48 PosixUtil_HC_OPTS ='-\#include"cbits/libposix.h"' -monly-3-regs
49 PosixDB_HC_OPTS ='-\#include"cbits/libposix.h"'
50 PosixErr_HC_OPTS ='-\#include"cbits/libposix.h"'
51 PosixFiles_HC_OPTS ='-\#include"cbits/libposix.h"'
52 PosixIO_HC_OPTS ='-\#include"cbits/libposix.h"'
53 PosixProcEnv_HC_OPTS ='-\#include"cbits/libposix.h"'
54 PosixProcPrim_HC_OPTS ='-\#include"cbits/libposix.h"'
55 PosixTTY_HC_OPTS ='-\#include"cbits/libposix.h"' -monly-2-regs
56 Posix_HC_OPTS ='-\#include"cbits/libposix.h"'
58 # KSW 1998-12: had to increase some of the heap sizes by 2m for USP
59 PosixProcPrim_HC_OPTS += -H8m
60 PosixFiles_HC_OPTS += -H8m
63 ../misc/PackedString_HC_OPTS += -H8m
65 #-----------------------------------------------------------------------------
66 # Dependency generation
68 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
70 #-----------------------------------------------------------------------------
71 # Installation; need to install .hi files as well as libraries
73 # The interface files are put inside the $(libdir), since they
74 # might (potentially) be platform specific..
76 # override is used here because for binary distributions, datadir is
77 # set on the command line. sigh.
79 override datadir:=$(libdir)/imports/posix
82 # Files to install from here
84 INSTALL_LIBS += $(LIBRARY)
85 INSTALL_DATAS += $(HS_IFACES)
87 include $(TOP)/mk/target.mk