[project @ 1998-02-20 13:23:46 by simonm]
[ghc-hetmet.git] / ghc / lib / posix / Makefile
1 #
2 # Makefile for hslibs subdir
3 #
4 TOP=../..
5 include $(TOP)/mk/boilerplate.mk
6
7 WAYS=$(GhcLibWays)
8
9 ifeq "$(way)" ""
10 SUBDIRS = cbits
11 else
12 SUBDIRS=
13 endif
14
15 #-----------------------------------------------------------------------------
16 #       Setting the standard variables
17 #
18
19 LIBRARY = libHSposix$(_way).a
20 HS_SRCS = $(wildcard *.lhs)
21 LIBOBJS = $(HS_OBJS)
22 HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi)
23
24 #-----------------------------------------------------------------------------
25 #       Setting the GHC compile options
26
27 SRC_HC_OPTS += -i../misc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
28
29 #
30 # Profiling options
31 WAY_p_HC_OPTS += -GPrelude
32 WAY_mr_HC_OPTS += -GPrelude
33
34 #
35 # Object and interface files have suffixes tagged with their ways
36 #
37 ifneq "$(way)" ""
38 SRC_HC_OPTS += -hisuf $(way_)hi
39 endif
40
41 #
42 # Specific flags
43 #
44 PosixUtil_HC_OPTS     ='-\#include"cbits/libposix.h"' -monly-3-regs
45 PosixDB_HC_OPTS       ='-\#include"cbits/libposix.h"'
46 PosixErr_HC_OPTS      ='-\#include"cbits/libposix.h"'
47 PosixFiles_HC_OPTS    ='-\#include"cbits/libposix.h"'
48 PosixIO_HC_OPTS       ='-\#include"cbits/libposix.h"'
49 PosixProcEnv_HC_OPTS  ='-\#include"cbits/libposix.h"'
50 PosixProcPrim_HC_OPTS ='-\#include"cbits/libposix.h"'
51 PosixTTY_HC_OPTS      ='-\#include"cbits/libposix.h"' -monly-2-regs
52 Posix_HC_OPTS         ='-\#include"cbits/libposix.h"'
53
54 #-----------------------------------------------------------------------------
55 #       Dependency generation
56
57 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
58
59 #-----------------------------------------------------------------------------
60 #       Installation; need to install .hi files as well as libraries
61 #
62 # The interface files are put inside the $(libdir), since they
63 # might (potentially) be platform specific..
64 #
65 # override is used here because for binary distributions, datadir is
66 # set on the command line. sigh.
67 #
68 override datadir:=$(libdir)/imports/posix
69
70 #
71 # Files to install from here
72
73 INSTALL_LIBS  += $(LIBRARY)
74 INSTALL_DATAS += $(HS_IFACES)
75
76 include $(TOP)/mk/target.mk
77