[project @ 2001-03-01 12:25:32 by rrt]
[ghc-hetmet.git] / ghc / lib / std / cbits / Makefile
index 011c929..d3c75a4 100644 (file)
@@ -1,58 +1,31 @@
-# $Id: Makefile,v 1.10 1999/12/04 15:17:42 panne Exp $
+# $Id: Makefile,v 1.25 2001/03/01 12:25:33 rrt Exp $
 
 TOP = ../../..
 include $(TOP)/mk/boilerplate.mk
 
-ifeq "$(filter dll,$(WAYS))" "dll"
-override WAYS=dll
-else
 override WAYS=
-endif
 
-LIBRARY=libHS_cbits$(_way).a
+HSLIB = std
+IS_CBITS_LIB = YES
 
 C_SRCS= $(wildcard *.c)
 
 C_OBJS  = $(C_SRCS:.c=.$(way_)o)
 LIBOBJS = $(C_OBJS)
-SRC_CC_OPTS += -O -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR) $(GhcLibCcOpts)
-
-ifneq "$(way)" "dll"
-SRC_CC_OPTS += -static
-endif
-
-ifeq "$(way)" "dll"
-all :: DllVersionInfo.o
-
-$(DLL_NAME) : DllVersionInfo.o
+SRC_CC_OPTS += -O $(GhcLibCcOpts) -Wall -optc-DCOMPILING_STDLIB
+ifeq "$(DLLized)" "YES"
+SRC_CC_OPTS += -dynamic
 endif
 
-DLL_NAME = HScbits.dll
-DLL_IMPLIB_NAME = libHScbits_imp.a
-DLL_DESCRIPTION = "Haskell Prelude helpers"
-SRC_BLD_DLL_OPTS += --export-all --output-def=HScbits.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=$(GHC)
-
-SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
+CC=$(GHC_INPLACE)
 
 # -----------------------------------------------------------------------------
 # 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)
+INSTALL_DATAS += HsStd.h stgio.h stgerror.h fileObject.h
 
 include $(TOP)/mk/target.mk