2 # $Id: Makefile,v 1.8 1999/10/05 10:30:29 simonmar Exp $
4 # Makefile for POSIX library
8 include $(TOP)/mk/boilerplate.mk
20 #-----------------------------------------------------------------------------
21 # Setting the standard variables
24 LIBRARY = libHSposix$(_way).a
25 HS_SRCS = $(wildcard *.lhs)
27 HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi)
28 SRC_MKDEPENDHS_OPTS += -optdep--include-prelude
30 #-----------------------------------------------------------------------------
31 # Setting the GHC compile options
33 SRC_HC_OPTS += -i../misc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
37 WAY_p_HC_OPTS += -GPrelude
38 WAY_mr_HC_OPTS += -GPrelude
41 # Object and interface files have suffixes tagged with their ways
44 SRC_HC_OPTS += -hisuf $(way_)hi
50 PosixUtil_HC_OPTS ='-\#include"cbits/libposix.h"' -monly-3-regs
51 PosixDB_HC_OPTS ='-\#include"cbits/libposix.h"'
52 PosixErr_HC_OPTS ='-\#include"cbits/libposix.h"'
53 PosixFiles_HC_OPTS ='-\#include"cbits/libposix.h"'
54 PosixIO_HC_OPTS ='-\#include"cbits/libposix.h"'
55 PosixProcEnv_HC_OPTS ='-\#include"cbits/libposix.h"'
56 PosixProcPrim_HC_OPTS ='-\#include"cbits/libposix.h"'
57 PosixTTY_HC_OPTS ='-\#include"cbits/libposix.h"' -monly-2-regs
58 Posix_HC_OPTS ='-\#include"cbits/libposix.h"'
60 PosixProcPrim_HC_OPTS += -H8m
61 PosixFiles_HC_OPTS += -H8m
64 ../misc/PackedString_HC_OPTS += -H8m
66 #-----------------------------------------------------------------------------
67 # Dependency generation
69 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
71 #-----------------------------------------------------------------------------
72 # Installation; need to install .hi files as well as libraries
74 # The interface files are put inside the $(libdir), since they
75 # might (potentially) be platform specific..
77 # override is used here because for binary distributions, datadir is
78 # set on the command line. sigh.
80 override datadir:=$(libdir)/imports/posix
83 # Files to install from here
85 INSTALL_LIBS += $(LIBRARY)
86 INSTALL_DATAS += $(HS_IFACES)
88 include $(TOP)/mk/target.mk