[project @ 1998-02-25 16:02:11 by simonm]
[ghc-hetmet.git] / ghc / lib / posix / Makefile
1 # $Id: Makefile,v 1.3 1998/02/25 16:02:11 simonm 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
26 #-----------------------------------------------------------------------------
27 #       Setting the GHC compile options
28
29 SRC_HC_OPTS += -i../misc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
30
31 #
32 # Profiling options
33 WAY_p_HC_OPTS += -GPrelude
34 WAY_mr_HC_OPTS += -GPrelude
35
36 #
37 # Object and interface files have suffixes tagged with their ways
38 #
39 ifneq "$(way)" ""
40 SRC_HC_OPTS += -hisuf $(way_)hi
41 endif
42
43 #
44 # Specific flags
45 #
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"'
55
56 #-----------------------------------------------------------------------------
57 #       Dependency generation
58
59 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
60
61 #-----------------------------------------------------------------------------
62 #       Installation; need to install .hi files as well as libraries
63 #
64 # The interface files are put inside the $(libdir), since they
65 # might (potentially) be platform specific..
66 #
67 # override is used here because for binary distributions, datadir is
68 # set on the command line. sigh.
69 #
70 override datadir:=$(libdir)/imports/posix
71
72 #
73 # Files to install from here
74
75 INSTALL_LIBS  += $(LIBRARY)
76 INSTALL_DATAS += $(HS_IFACES)
77
78 include $(TOP)/mk/target.mk
79