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