Makefile 2.17 KB
Newer Older
1
#
2
# $Id: Makefile,v 1.7 1999/05/11 17:05:48 keithw Exp $
3
#
4
# Makefile for POSIX library
5
#
6

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
TOP=../..
include $(TOP)/mk/boilerplate.mk

WAYS=$(GhcLibWays)

ifeq "$(way)" ""
SUBDIRS = cbits
else
SUBDIRS=
endif

#-----------------------------------------------------------------------------
# 	Setting the standard variables
#

LIBRARY = libHSposix$(_way).a
HS_SRCS	= $(wildcard *.lhs)
LIBOBJS = $(HS_OBJS)
25
HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi)
sof's avatar
sof committed
26
SRC_MKDEPENDHS_OPTS += -optdep--include-prelude
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

#-----------------------------------------------------------------------------
# 	Setting the GHC compile options

SRC_HC_OPTS += -i../misc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)

#
# Profiling options
WAY_p_HC_OPTS += -GPrelude
WAY_mr_HC_OPTS += -GPrelude

#
# Object and interface files have suffixes tagged with their ways
#
ifneq "$(way)" ""
SRC_HC_OPTS += -hisuf $(way_)hi
endif

#
# Specific flags
#
PosixUtil_HC_OPTS     ='-\#include"cbits/libposix.h"' -monly-3-regs
PosixDB_HC_OPTS       ='-\#include"cbits/libposix.h"'
PosixErr_HC_OPTS      ='-\#include"cbits/libposix.h"'
PosixFiles_HC_OPTS    ='-\#include"cbits/libposix.h"'
PosixIO_HC_OPTS       ='-\#include"cbits/libposix.h"'
PosixProcEnv_HC_OPTS  ='-\#include"cbits/libposix.h"'
PosixProcPrim_HC_OPTS ='-\#include"cbits/libposix.h"'
PosixTTY_HC_OPTS      ='-\#include"cbits/libposix.h"' -monly-2-regs
Posix_HC_OPTS         ='-\#include"cbits/libposix.h"'

58
59
60
PosixProcPrim_HC_OPTS += -H8m
PosixFiles_HC_OPTS    += -H8m

61
62
63
# sigh.
../misc/PackedString_HC_OPTS += -H8m

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#-----------------------------------------------------------------------------
# 	Dependency generation

SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)

#-----------------------------------------------------------------------------
# 	Installation; need to install .hi files as well as libraries
#
# The interface files are put inside the $(libdir), since they
# might (potentially) be platform specific..
#
# override is used here because for binary distributions, datadir is
# set on the command line. sigh.
#
override datadir:=$(libdir)/imports/posix

#
# Files to install from here
# 
INSTALL_LIBS  += $(LIBRARY)
INSTALL_DATAS += $(HS_IFACES)

include $(TOP)/mk/target.mk