X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fstd%2Fcbits%2FMakefile;h=3593d8d011c8922f9f6dc3bd2e1df67c273c6b8f;hb=fd9890ec70363703dd5071c8721d657a9416fd8e;hp=b330b627d5a7f1350697a980d490951cbf0654a4;hpb=28139aea50376444d56f43f0914291348a51a7e7;p=ghc-hetmet.git diff --git a/ghc/lib/std/cbits/Makefile b/ghc/lib/std/cbits/Makefile index b330b62..3593d8d 100644 --- a/ghc/lib/std/cbits/Makefile +++ b/ghc/lib/std/cbits/Makefile @@ -1,30 +1,60 @@ -# $Id: Makefile,v 1.1 1998/02/02 17:34:22 simonm Exp $ +# $Id: Makefile,v 1.18 2000/04/14 16:17:49 rrt Exp $ TOP = ../../.. include $(TOP)/mk/boilerplate.mk + +WAYS=$(GhcLibWays) + +ifeq "$(filter dll,$(WAYS))" "dll" +override WAYS=dll +else override WAYS= +endif -LIBRARY=libHS_cbits.a -INSTALL_LIBS+=$(LIBRARY) +LIBRARY=libHSstd_cbits$(_way).a -SRCS= $(wildcard *.lc) +C_SRCS= $(wildcard *.c) -C_SRCS = $(SRCS:.lc=.c) -C_OBJS = $(C_SRCS:.c=.o) +C_OBJS = $(C_SRCS:.c=.$(way_)o) LIBOBJS = $(C_OBJS) -SRC_CC_OPTS = -O -I$(GHC_INCLUDE_DIR) +SRC_CC_OPTS += -O -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR) $(GhcLibCcOpts) -Wall + +ifneq "$(way)" "dll" +SRC_CC_OPTS += -static +endif + +ifeq "$(way)" "dll" +all :: DllVersionInfo.o + +$(DLL_NAME) : DllVersionInfo.o +endif + +DLL_NAME = HSstd_cbits.dll +DLL_IMPLIB_NAME = libHSstd_cbits_imp.a +DLL_DESCRIPTION = "Haskell Prelude helpers" +SRC_BLD_DLL_OPTS += --export-all --output-def=HSstdcbits.def DllVersionInfo.o +SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lgmp -L. -L../../../rts/gmp -L../../../rts # # Compile the files using the Haskell compiler (ghc really). # -CC=$(HC) - -# -# Remove the intermediate .c files -# (the .o's will be removed automatically by default mk setup) -# -CLEAN_FILES += $(C_SRCS) +CC=$(GHC_INPLACE) SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR) +# ----------------------------------------------------------------------------- +# Installation + +INSTALL_LIBS+=$(LIBRARY) + +ifeq "$(EnableWin32DLLs)" "YES" +INSTALL_PROGS += $(DLL_NAME) +INSTALL_LIBS += $(patsubst %.a, %_imp.a, $(LIBRARY)) +endif + +# install header files for the I/O library. Other code might want to +# plug +override datadir:=$(libdir)/includes +INSTALL_DATAS += $(wildcard *.h) + include $(TOP)/mk/target.mk