[project @ 1999-10-29 13:55:40 by sof]
[ghc-hetmet.git] / ghc / lib / concurrent / Makefile
1 # $Id: Makefile,v 1.9 1999/10/29 13:55:40 sof Exp $
2 #
3 # Makefile for concurrent libraries.
4 #
5
6 TOP = ../..
7 include $(TOP)/mk/boilerplate.mk
8
9 WAYS=$(GhcLibWays)
10
11 HC = $(GHC)
12
13 #-----------------------------------------------------------------------------
14 #       Setting the standard variables
15 #
16
17 LIBRARY = libHSconcurrent$(_way).a
18 HS_SRCS = $(wildcard *.lhs)
19 HS_OBJS = $(HS_SRCS:.lhs=.$(way_)o)
20 LIBOBJS = $(HS_OBJS)
21 HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi)
22
23
24 #-----------------------------------------------------------------------------
25 #       Setting the GHC compile options
26
27 SRC_HC_OPTS += -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
28 SRC_MKDEPENDHS_OPTS += -optdep--include-prelude
29
30 #
31 # Profiling options
32 WAY_p_HC_OPTS += -GPrelude
33 WAY_mr_HC_OPTS += -GPrelude
34
35 #
36 # Object and interface files have suffixes tagged with their ways
37 #
38 ifneq "$(way)" ""
39 SRC_HC_OPTS += -hisuf $(way_)hi
40 endif
41
42 Parallel_HC_OPTS  += -fglasgow-exts
43
44 #-----------------------------------------------------------------------------
45 #       Dependency generation
46
47 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
48
49 DLL_NAME = HSconc.dll
50 DLL_IMPLIB_NAME = libHSconcurrent_imp.a
51 SRC_BLD_DLL_OPTS += --export-all --output-def=HSconc.def DllVersionInfo.o
52 SRC_BLD_DLL_OPTS += -lwinmm -lHSrts_imp -lHScbits_imp -lHS_imp -lgmp -L. -L../../rts/gmp -L../../rts -L../std -L../std/cbits
53
54 ifeq "$(way)" "dll"
55 all :: DllVersionInfo.o
56 endif
57
58 #-----------------------------------------------------------------------------
59 #       Installation; need to install .hi files as well as libraries
60 #
61 # The interface files are put inside the $(libdir), since they
62 # might (potentially) be platform specific..
63 #
64 # override is used here because for binary distributions, datadir is
65 # set on the command line. sigh.
66 #
67 override datadir:=$(libdir)/imports/concurrent
68
69 #
70 # Files to install from here
71
72 INSTALL_LIBS  += $(LIBRARY)
73 INSTALL_DATAS += $(HS_IFACES)
74 ifeq "$(EnableWin32DLLs)" "YES"
75 INSTALL_PROGS += $(DLL_NAME)
76 INSTALL_LIBS  += $(patsubst %.a, %_imp.a, $(LIBRARY))
77 INSTALL_DATAS += dLL_ifs.hi
78 endif
79
80 include $(TOP)/mk/target.mk
81