d4b80657e89dc1cb35bef1bc727fd8b8b72b4568
[ghc-hetmet.git] / ghc / lib / posix / Makefile
1 #
2 # $Id: Makefile,v 1.7 1999/05/11 17:05:48 keithw Exp $
3 #
4 # Makefile for POSIX library
5 #
6
7 TOP=../..
8 include $(TOP)/mk/boilerplate.mk
9
10 WAYS=$(GhcLibWays)
11
12 ifeq "$(way)" ""
13 SUBDIRS = cbits
14 else
15 SUBDIRS=
16 endif
17
18 #-----------------------------------------------------------------------------
19 #       Setting the standard variables
20 #
21
22 LIBRARY = libHSposix$(_way).a
23 HS_SRCS = $(wildcard *.lhs)
24 LIBOBJS = $(HS_OBJS)
25 HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi)
26 SRC_MKDEPENDHS_OPTS += -optdep--include-prelude
27
28 #-----------------------------------------------------------------------------
29 #       Setting the GHC compile options
30
31 SRC_HC_OPTS += -i../misc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
32
33 #
34 # Profiling options
35 WAY_p_HC_OPTS += -GPrelude
36 WAY_mr_HC_OPTS += -GPrelude
37
38 #
39 # Object and interface files have suffixes tagged with their ways
40 #
41 ifneq "$(way)" ""
42 SRC_HC_OPTS += -hisuf $(way_)hi
43 endif
44
45 #
46 # Specific flags
47 #
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"'
57
58 PosixProcPrim_HC_OPTS += -H8m
59 PosixFiles_HC_OPTS    += -H8m
60
61 # sigh.
62 ../misc/PackedString_HC_OPTS += -H8m
63
64 #-----------------------------------------------------------------------------
65 #       Dependency generation
66
67 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
68
69 #-----------------------------------------------------------------------------
70 #       Installation; need to install .hi files as well as libraries
71 #
72 # The interface files are put inside the $(libdir), since they
73 # might (potentially) be platform specific..
74 #
75 # override is used here because for binary distributions, datadir is
76 # set on the command line. sigh.
77 #
78 override datadir:=$(libdir)/imports/posix
79
80 #
81 # Files to install from here
82
83 INSTALL_LIBS  += $(LIBRARY)
84 INSTALL_DATAS += $(HS_IFACES)
85
86 include $(TOP)/mk/target.mk
87