Commit 68ee122f authored by sof's avatar sof
Browse files

[project @ 1999-09-17 10:43:51 by sof]

DLL building tweaks, including terrible hack to compile PrelMain
parent cc61e719
# $Id: Makefile,v 1.6 1999/05/05 10:48:06 sof Exp $
# $Id: Makefile,v 1.7 1999/09/17 10:43:51 sof Exp $
#
# Makefile for concurrent libraries.
#
......@@ -47,7 +47,7 @@ SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
DLL_NAME = HSconc.dll
DLL_IMPLIB_NAME = libHSconcurrent_imp.a
SRC_BLD_DLL_OPTS += --export-all --output-def=HSconc.def
SRC_BLD_DLL_OPTS += -lwinmm -lHSrts_imp -lHS_cbits_imp -lHS_imp -lgmp -L. -L../../rts/gmp -L../../rts -L../std -L../std/cbits
SRC_BLD_DLL_OPTS += -lwinmm -lHSrts_imp -lHScbits_imp -lHS_imp -lgmp -L. -L../../rts/gmp -L../../rts -L../std -L../std/cbits
#-----------------------------------------------------------------------------
# Installation; need to install .hi files as well as libraries
......@@ -65,6 +65,11 @@ override datadir:=$(libdir)/imports/concurrent
#
INSTALL_LIBS += $(LIBRARY)
INSTALL_DATAS += $(HS_IFACES)
ifeq "$(EnableWin32DLLs)" "YES"
INSTALL_PROGS += $(DLL_NAME)
INSTALL_LIBS += $(patsubst %.a, %_imp.a, $(LIBRARY))
INSTALL_DATAS += dLL_ifs.hi
endif
include $(TOP)/mk/target.mk
......@@ -62,7 +62,7 @@ SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR) -optdep--include-prelude -optdep-w $
DLL_NAME = HSexts.dll
DLL_IMPLIB_NAME = libHSexts_imp.a
SRC_BLD_DLL_OPTS += --export-all --output-def=HSexts.def
SRC_BLD_DLL_OPTS += -lwinmm -lHSrts_imp -lHS_cbits_imp -lHS_imp -lgmp -L. -L../../rts/gmp -L../../rts -L../std -L../std/cbits
SRC_BLD_DLL_OPTS += -lwinmm -lHSrts_imp -lHScbits_imp -lHS_imp -lgmp -L. -L../../rts/gmp -L../../rts -L../std -L../std/cbits
#-----------------------------------------------------------------------------
# Installation; need to install .hi files as well as libraries
......@@ -81,4 +81,10 @@ override datadir:=$(libdir)/imports/exts
INSTALL_LIBS += $(LIBRARY)
INSTALL_DATAS += $(HS_IFACES)
ifeq "$(EnableWin32DLLs)" "YES"
INSTALL_PROGS += $(DLL_NAME)
INSTALL_LIBS += $(patsubst %.a, %_imp.a, $(LIBRARY))
INSTALL_DATAS += dLL_ifs.hi
endif
include $(TOP)/mk/target.mk
# $Id: Makefile,v 1.17 1999/08/06 10:55:26 simonmar Exp $
# $Id: Makefile,v 1.18 1999/09/17 10:43:52 sof Exp $
#
# Makefile for miscellaneous libraries.
#
......@@ -19,7 +19,10 @@ endif
#
LIBRARY = libHSmisc$(_way).a
HS_SRCS = $(wildcard *.lhs)
ifeq "$(EnableWin32DLLs)" "YES"
HS_SRCS := $(filter-out Select.lhs,$(HS_SRCS))
endif
# Remove Readline.lhs if readline.h isn't available.
ifneq "$(GhcLibsWithReadline)" "YES"
......@@ -79,7 +82,7 @@ SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
DLL_NAME = HSmisc.dll
DLL_IMPLIB_NAME = libHSmisc_imp.a
SRC_BLD_DLL_OPTS += --export-all --output-def=HSmisc.def
SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lHS_cbits_imp -lHSmisc_cbits_imp -lHS_imp -lHSexts_imp -lgmp -L. -L../../rts/gmp -L../../rts -L../std -L../std/cbits -L../exts -Lcbits
SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lHScbits_imp -lHSmisc_cbits_imp -lHS_imp -lHSexts_imp -lgmp -L. -L../../rts/gmp -L../../rts -L../std -L../std/cbits -L../exts -Lcbits
#-----------------------------------------------------------------------------
......@@ -99,5 +102,11 @@ override datadir:=$(libdir)/imports/misc
INSTALL_LIBS += $(LIBRARY)
INSTALL_DATAS += $(HS_IFACES)
ifeq "$(EnableWin32DLLs)" "YES"
INSTALL_PROGS += $(DLL_NAME)
INSTALL_LIBS += $(patsubst %.a, %_imp.a, $(LIBRARY))
INSTALL_DATAS += dLL_ifs.hi
endif
include $(TOP)/mk/target.mk
......@@ -14,6 +14,14 @@ ifneq "$(HAVE_READLINE)" "YES"
C_SRCS := $(filter-out ghcReadline.c,$(C_SRCS))
endif
ifeq "$(EnableWin32DLLs)" "YES"
C_SRCS := $(filter-out selectFrom.c,$(C_SRCS))
endif
ifneq "$(way)" "dll"
SRC_CC_OPTS += -static
endif
SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_LIB_DIR)/std/cbits
......@@ -23,6 +31,11 @@ INSTALL_LIBS += $(LIBRARY)
DLL_NAME = HSmisc_cbits.dll
SRC_BLD_DLL_OPTS += --export-all --output-def=HSmisc_cbits.def
SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lHS_cbits_imp -lgmp -L. -L../../../rts/gmp -L../../../rts -L../../std/cbits
SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lHScbits_imp -lgmp -L. -L../../../rts/gmp -L../../../rts -L../../std/cbits
ifeq "$(EnableWin32DLLs)" "YES"
INSTALL_PROGS += $(DLL_NAME)
INSTALL_LIBS += $(patsubst %.a, %_imp.a, $(LIBRARY))
endif
include $(TOP)/mk/target.mk
......@@ -84,13 +84,37 @@ boot :: PrelGHC.hi $(foreach way, $(WAYS), PrelGHC.$(way)_hi)
DLL_NAME = HSprel.dll
DLL_IMPLIB_NAME = libHS_imp.a
SRC_BLD_DLL_OPTS += --export-all --output-def=HSprel.def
SRC_BLD_DLL_OPTS += -lwinmm -lHSrts_imp -lHS_cbits_imp -lgmp -L. -L../../rts/gmp -L../../rts -Lcbits
SRC_BLD_DLL_OPTS += -lwinmm -lHSrts_imp -lHScbits_imp -lgmp -L. -L../../rts/gmp -L../../rts -Lcbits
ifeq "$(way)" "dll"
HS_SRCS := $(filter-out PrelMain.lhs, $(HS_SRCS))
endif
# PrelMain.dll_o isn't to be included in the final .a
ifeq "$(way)" "dll"
all :: PrelMain.dll_o
endif
#
# Building PrelMain.dll_o is, unfortunately, somewhat tricky
# with the current DLL setup. PrelMain.dll_o should refer to
# all its imports bar Main.main_closure as residing in DLLs.
# But, since the .hi's of PrelBase et al. is in the same
# directory as PrelMain, the compiler will assume that they
# reside in the same DLL as PrelMain & generate code accordingly.
#
# So, we copy out PrelMain.lhs to ".." and build it there &
# copy the gen'ed object file back in again.
#
ifeq "$(way)" "dll"
PrelMain.dll_o : PrelMain.lhs
$(RM) ../PrelMain.lhs
$(CP) PrelMain.lhs ../
$(MAKE) -C .. PrelMain.dll_o way=dll HC_OPTS="$(filter-out -fcompiling-prelude, $(HC_OPTS))"
$(MV) ../PrelMain.dll_o .
$(RM) ../PrelMain.lhs ../PrelMain.dll_hi
endif
#-----------------------------------------------------------------------------
# Installation; need to install .hi files as well as libraries
......@@ -109,7 +133,7 @@ override datadir:=$(libdir)/imports/std
INSTALL_LIBS += $(LIBRARY)
ifeq "$(EnableWin32DLLs)" "YES"
INSTALL_PROGS += $(DLL_NAME)
INSTALL_LIBS += $(patsubst %.a, %_imp.a, $(LIBRARY)) PrelMain.o
INSTALL_LIBS += $(patsubst %.a, %_imp.a, $(LIBRARY)) PrelMain.dll_o
INSTALL_DATAS += dLL_ifs.hi
endif
INSTALL_DATAS += $(HS_IFACES)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment