1 # $Id: Makefile,v 1.3 1998/02/25 16:02:11 simonm 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)
26 #-----------------------------------------------------------------------------
27 # Setting the GHC compile options
29 SRC_HC_OPTS += -i../misc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
33 WAY_p_HC_OPTS += -GPrelude
34 WAY_mr_HC_OPTS += -GPrelude
37 # Object and interface files have suffixes tagged with their ways
40 SRC_HC_OPTS += -hisuf $(way_)hi
46 PosixUtil_HC_OPTS ='-\#include"cbits/libposix.h"' -monly-3-regs
47 PosixDB_HC_OPTS ='-\#include"cbits/libposix.h"'
48 PosixErr_HC_OPTS ='-\#include"cbits/libposix.h"'
49 PosixFiles_HC_OPTS ='-\#include"cbits/libposix.h"'
50 PosixIO_HC_OPTS ='-\#include"cbits/libposix.h"'
51 PosixProcEnv_HC_OPTS ='-\#include"cbits/libposix.h"'
52 PosixProcPrim_HC_OPTS ='-\#include"cbits/libposix.h"'
53 PosixTTY_HC_OPTS ='-\#include"cbits/libposix.h"' -monly-2-regs
54 Posix_HC_OPTS ='-\#include"cbits/libposix.h"'
56 #-----------------------------------------------------------------------------
57 # Dependency generation
59 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
61 #-----------------------------------------------------------------------------
62 # Installation; need to install .hi files as well as libraries
64 # The interface files are put inside the $(libdir), since they
65 # might (potentially) be platform specific..
67 # override is used here because for binary distributions, datadir is
68 # set on the command line. sigh.
70 override datadir:=$(libdir)/imports/posix
73 # Files to install from here
75 INSTALL_LIBS += $(LIBRARY)
76 INSTALL_DATAS += $(HS_IFACES)
78 include $(TOP)/mk/target.mk