# State what the pathname of the installation directory is to be, e.g. 
InstallDir = /usr/local/tkmkmf

# State where the user visible link tkmkmf to the real tkmkmf script
# in ${InstallDir}/bin is to be located, e.g.
BinDir = /usr/local/bin

# State the location of your X11 config directory, e.g.
X11ConfigDir = /usr/local/X11/lib/X11/config

# State the location of your Tcl include files, e.g.
TclIncDir = /usr/local/tcl/include

# State the location of your Tcl library, e.g.
TclLibDir = /usr/local/tcl/lib

# State the location of your Tk include files, e.g.
TkIncDir = /usr/local/tk/include

# State the location of your Tk library, e.g.
TkLibDir = /usr/local/tk/lib

# State the name of your C++ compiler, e.g.
CCcompiler = CC

# If your system doesn't have ranlib then set Ranlib in the next line
# to something innocuous like echo.
Ranlib = ranlib

all:
	sed -e '1,$$s+!!!!CONFIGDIR!!!!+${InstallDir}/config+' \
	    -e '1,$$s+!!!!XCONFIGDIR!!!!+${X11ConfigDir}+'     \
            <tkmkmf.sed >bin/tkmkmf

	sed -e '1,$$s+!!!!TKMKMF!!!!+${InstallDir}+' \
	    -e '1,$$s+!!!!TKINC!!!!+${TkIncDir}+'    \
	    -e '1,$$s+!!!!TCLINC!!!!+${TclIncDir}+'  \
	    -e '1,$$s+!!!!TCLLIB!!!!+${TclLibDir}+'  \
	    -e '1,$$s+!!!!TKLIB!!!!+${TkLibDir}+'    \
	    <tkmkmf.rules.sed >config/tkmkmf.rules

	sed -e '1,$$s+!!!!CC!!!!+${CCcompiler}+'     \
	    -e '1,$$s+!!!!TKINC!!!!+${TkIncDir}+'    \
	    -e '1,$$s+!!!!TCLINC!!!!+${TclIncDir}+'  \
	    <Makefile.sed >src/Makefile	

install:
	mkdirhier ${InstallDir}
	chmod 755 bin/tkmkmf
	cp -rp include bin lib config ${InstallDir}
	${Ranlib} ${InstallDir}/lib/AppInit.a
	rm -rf ${BinDir}/tkmkmf
	ln -s ${InstallDir}/bin/tkmkmf ${BinDir}/tkmkmf
