[project @ 2000-03-17 17:05:27 by rrt]
[ghc-hetmet.git] / ghc / lib / std / cbits / Makefile
index 4c95772..391a09d 100644 (file)
@@ -1,8 +1,10 @@
-# $Id: Makefile,v 1.8 1999/11/09 10:46:27 simonmar Exp $
+# $Id: Makefile,v 1.14 2000/03/17 17:05:27 rrt Exp $
 
 TOP = ../../..
 include $(TOP)/mk/boilerplate.mk
 
+WAYS=$(GhcLibWays)
+
 ifeq "$(filter dll,$(WAYS))" "dll"
 override WAYS=dll
 else
@@ -10,13 +12,12 @@ override WAYS=
 endif
 
 LIBRARY=libHS_cbits$(_way).a
-INSTALL_LIBS+=$(LIBRARY)
 
 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)
+SRC_CC_OPTS += -O -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR) $(GhcLibCcOpts) -Wall
 
 ifneq "$(way)" "dll"
 SRC_CC_OPTS += -static
@@ -29,7 +30,7 @@ $(DLL_NAME) : DllVersionInfo.o
 endif
 
 DLL_NAME = HScbits.dll
-DLL_IMPLIB_NAME = libHScbits_imp.a
+DLL_IMPLIB_NAME = libHS_cbits_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
@@ -37,13 +38,23 @@ SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lgmp -L. -L../../../rts/gmp -
 #
 # Compile the files using the Haskell compiler (ghc really).
 # 
-CC=$(GHC)
+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