1 # $Id: Makefile,v 1.4 1998/04/16 12:50:44 sof Exp $
3 # Makefile for POSIX library
7 include $(TOP)/mk/boilerplate.mk
17 #-----------------------------------------------------------------------------
18 # Setting the standard variables
21 LIBRARY = libHSposix$(_way).a
22 HS_SRCS = $(wildcard *.lhs)
24 HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi)
25 SRC_MKDEPENDHS_OPTS += -optdep--include-prelude
27 #-----------------------------------------------------------------------------
28 # Setting the GHC compile options
30 SRC_HC_OPTS += -i../misc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
34 WAY_p_HC_OPTS += -GPrelude
35 WAY_mr_HC_OPTS += -GPrelude
38 # Object and interface files have suffixes tagged with their ways
41 SRC_HC_OPTS += -hisuf $(way_)hi
47 PosixUtil_HC_OPTS ='-\#include"cbits/libposix.h"' -monly-3-regs
48 PosixDB_HC_OPTS ='-\#include"cbits/libposix.h"'
49 PosixErr_HC_OPTS ='-\#include"cbits/libposix.h"'
50 PosixFiles_HC_OPTS ='-\#include"cbits/libposix.h"'
51 PosixIO_HC_OPTS ='-\#include"cbits/libposix.h"'
52 PosixProcEnv_HC_OPTS ='-\#include"cbits/libposix.h"'
53 PosixProcPrim_HC_OPTS ='-\#include"cbits/libposix.h"'
54 PosixTTY_HC_OPTS ='-\#include"cbits/libposix.h"' -monly-2-regs
55 Posix_HC_OPTS ='-\#include"cbits/libposix.h"'
57 #-----------------------------------------------------------------------------
58 # Dependency generation
60 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
62 #-----------------------------------------------------------------------------
63 # Installation; need to install .hi files as well as libraries
65 # The interface files are put inside the $(libdir), since they
66 # might (potentially) be platform specific..
68 # override is used here because for binary distributions, datadir is
69 # set on the command line. sigh.
71 override datadir:=$(libdir)/imports/posix
74 # Files to install from here
76 INSTALL_LIBS += $(LIBRARY)
77 INSTALL_DATAS += $(HS_IFACES)
79 include $(TOP)/mk/target.mk