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