freebsd-ports/devel/hs-tclhaskell-ghc/files/patch-Makefile
Oliver Braun fb7e284c21 Add hs-tclhaskell-ghc 1.2, tcl/Tk binding for Haskell.
PR:		ports/48948
Submitted by:	Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
2003-03-24 15:38:59 +00:00

77 lines
2.2 KiB
Text

--- Makefile.orig Wed Oct 3 16:58:55 2001
+++ Makefile Thu Mar 6 11:50:51 2003
@@ -11,10 +11,10 @@
LIBDIR = $(PREFIX)
# where to install the TclHaskell interface files
-IMPORTS = $(PREFIX)/imports
+IMPORTS = $(PREFIX)/imports/tclhaskell
# the library files to use - change for different version
-TCLLIBS = -ltk8.3 -ltcl8.3
+TCLLIBS = -ltk83 -ltcl83
# Ununcomment this line to support concurrency.
# This support does NOT work with ghci. It does not currently export
@@ -36,9 +36,9 @@
#
#######################################################################
-CC = gcc
-CC_OPTS = -O
-CC_INC = -I/usr/X11/include -I/usr/local/include
+CC ?= gcc
+CC_OPTS = $(CFLAGS)
+CC_INC = -I${X11BASE}/include -I${LOCALBASE}/include -I${LOCALBASE}/include/tcl8.3 -I${LOCALBASE}/include/tk8.3
# ld options for generating shared libraries for Hugs:
@@ -48,15 +48,15 @@
# The directories containing the X11, Tcl and Tk (binary) libraries:
-CCLIB = -L /usr/lib/X11 -L /usr/local/lib
+CCLIB = -L${X11BASE}/lib/X11 -L${LOCALBASE}/lib
# the libraries required by Tcl/Tk:
#TCLREQ = -ltk8.3 -ltcl8.3 -lX11 -lm -lsocket -lnsl -lintl -lw # (Solaris)
-TCL_REQ = -ltk8.3 -ltcl8.3 -lm -lc # (OSF/1+Linux)
+TCL_REQ = $(TCLLIBS) # -lm -lc # (OSF/1+Linux)
-GHC = ghc
+GHC ?= ghc
RM = rm -f
@@ -72,7 +72,7 @@
HIS = *.hi
GHC_OPTS = -O -fglasgow-exts -recomp -dcore-lint -fvia-C \
- -package concurrent -package-name TclHaskell
+ -package concurrent -package lang -package-name TclHaskell
GHC_INC =
@@ -95,13 +95,13 @@
all : libHSTclHaskell.a HSTclHaskell.o libHSTclHaskell_cbits.a HSTclHaskell_cbits.o
install : libHSTclHaskell.a HSTclHaskell.o
- mkdir -p $(LIBDIR)
- mkdir -p $(IMPORTS)
- cp -p libHSTclHaskell.a $(LIBDIR)/
- cp -p HSTclHaskell.o $(LIBDIR)/
- cp -p libHSTclHaskell_cbits.a $(LIBDIR)/
- cp -p HSTclHaskell_cbits.o $(LIBDIR)/
- cp -p $(HIS) $(IMPORTS)/
+ ${MKDIR} $(LIBDIR)
+ ${MKDIR} $(IMPORTS)
+ ${INSTALL_DATA} libHSTclHaskell.a $(LIBDIR)/
+ ${INSTALL_DATA} HSTclHaskell.o $(LIBDIR)/
+ ${INSTALL_DATA} libHSTclHaskell_cbits.a $(LIBDIR)/
+ ${INSTALL_DATA} HSTclHaskell_cbits.o $(LIBDIR)/
+ ${INSTALL_DATA} $(HIS) $(IMPORTS)/
pkg :
ghc-pkg -a < tclhaskell.conf