if test ! -d $root
then echo "error: directory '$root' does not exist"; exit 1; fi
-for v in allenc allmsgs aqua b64 cli dyn gui ppc \
+for v in allenc allmsgs aqua b64 cli dyn gui ppc mk \
gcov gprof sym thread tzdata univ x86
do eval $v=0; done
;;
SunOS)
+ echo "CFLAGS += -I/usr/openwin/include"
echo "LDFLAGS = -ldl -lsocket -lnsl -lm"
- echo "GUI_OPTS = -lX11 -lXext"
+ if [ $root = "8.5" ]; then
+ echo "GUI_OPTS = -L/usr/openwin/lib -L/usr/sfw/lib -lXft -lfreetype -lz -lfontconfig -lXrender -lX11 -lXext"
+ else
+ echo "GUI_OPTS = -L/usr/openwin/lib -lX11 -lXext"
+ fi
+ case $b64 in 1)
+ echo "CFLAGS += -m64" ;;
+ esac
;;
*) echo "warning: no settings known for '$mach'" >&2 ;;
echo "TCL_OPTS += --enable-64bit"
echo "TK_OPTS += --enable-64bit"
echo "VFS_OPTS += --enable-64bit"
- echo "VLERQ_OPTS += --enable-64bit" ;;
+ echo "VLERQ_OPTS += --enable-64bit"
+ echo "MK_OPTS += --enable-64bit"
+ echo "ITCL_OPTS += --enable-64bit"
+ ;;
esac
#case $verbose in 1) kitopts=" -d" ;; esac
echo "TKDYN_OPTS += --enable-symbols"
echo "VFS_OPTS += --enable-symbols"
echo "VLERQ_OPTS += --enable-symbols"
+ echo "MK_OPTS += --enable-symbols"
+ echo "ITCL_OPTS += --enable-symbols"
echo ;;
esac
case $cli in 1) targets="$targets tclkit-cli" ;; esac
case $dyn in 1) targets="$targets tclkit-dyn" ;; esac
case $gui in 1) targets="$targets tclkit-gui" ;; esac
+ case $mk in
+ 1) case $cli in 1) targets="$targets tclkitsh" ;; esac
+ case $gui in 1) targets="$targets tclkit" ;; esac
+ ;;
+ esac
case $thread in
1) echo "all: threaded$targets" ;;
echo "tclkit-cli: tclkit-cli.exe"
echo "tclkit-dyn: tclkit-dyn.exe"
echo "tclkit-gui: tclkit-gui.exe"
+ case $mk in 1) echo "tclkitsh: tclkitsh.exe"
+ echo "tclkit: tclkit.exe" ;;
+ esac
esac
echo
case $cli in 1) echo " $path/tclkit-cli (command-line)" ;; esac
case $dyn in 1) echo " $path/tclkit-dyn (Tk as shared lib)" ;; esac
case $gui in 1) echo " $path/tclkit-gui (Tk linked statically)" ;; esac
+ case $mk in 1)
+ case $cli in 1) echo " $path/tclkitsh (old-style command line)" ;; esac
+ case $gui in 1) echo " $path/tclkit (old-style with Tk)" ;; esac
+ ;;
+ esac
echo
echo "To remove all intermediate builds, use 'make clean'."
echo "To remove all executables as well, use 'make distclean'."
$(OUTDIR)/tclkitsh.res.o: ../../tclkit.rc
windres -o $@ --define STATIC_BUILD --include build/include \
--include ../../files $<
+
+#-------------------------------------------------------------------------
+# Old-style builds -
+# This section produces an old-style tclkit and tclkitsh that use
+# metakit and include incr-tcl statically linked in.
+
+tclkitsh$(EXE): kitsh$(EXE) ../../setupvfs.tcl build/files
+ cp kitsh$(EXE) $@ && $(STRIP) $@ && $(UPX) $@
+ ./kitsh -init- ../../setupvfs.tcl $(KIT_OPTS) $@ cli
+
+tclkit$(EXE): kitsh$(EXE) kit$(EXE) ../../setupvfs.tcl build/files
+ cp kit$(EXE) $@ && $(STRIP) $@ && $(UPX) $@
+ ./kitsh -init- ../../setupvfs.tcl $(KIT_OPTS) $@ gui
+
+kitsh$(EXE): build/tcl build/tclvfs build/mk build/itcl build/zlib $(CLIOBJ)
+ $(CC) -o $(OUTDIR)/kitInit$O $(CFLAGS) -DSTATIC_BUILD \
+ -DKIT_INCLUDES_ITCL \
+ -Ibuild/include -c ../../kitInit.c
+ $(CXX) -o $@ $(CFLAGS) $(OUTDIR)/kitInit$O $(CLIOBJ) \
+ -Ibuild/include -DSTATIC_BUILD \
+ build/lib/vfs1*/*vfs1*$A build/lib/Mk4tcl*/*Mk4tcl*$A \
+ build/lib/itcl*/*itcl3*$A \
+ build/lib/libz$A build/lib/*tcl8*$A $(LDFLAGS)
+
+kit$(EXE): build/tcl build/tk build/tclvfs build/mk build/itcl build/zlib $(GUIOBJ)
+ $(CC) -o $(OUTDIR)/kitInit$O $(CFLAGS) -DSTATIC_BUILD \
+ -DKIT_INCLUDES_ITCL -DKIT_INCLUDES_TK \
+ -Ibuild/include -c ../../kitInit.c
+ $(CXX) -o $@ $(CFLAGS) $(OUTDIR)/kitInit$O $(GUIOBJ) \
+ -Ibuild/include -DSTATIC_BUILD \
+ build/lib/vfs1*/*vfs1*$A build/lib/Mk4tcl*/*Mk4tcl*$A \
+ build/lib/libtk8*$A build/lib/itcl*/*itcl3*$A \
+ build/lib/libz$A build/lib/*tcl8*$A $(LDFLAGS) $(GUI_OPTS)
+
+build/mk: build/tcl
+ mkdir -p $@ && cd $@ && CFLAGS="$(CFLAGS)" && export CFLAGS && \
+ sh $(EXTDIR)/mk/tcl/configure $(STATIC) $(TCLDIR) $(MK_OPTS) && \
+ $(MAKE) install-binaries install-libraries
+
+build/itcl: build/tcl
+ mkdir -p $@ && cd $@ && CFLAGS="$(CFLAGS)" && export CFLAGS && \
+ sh $(EXTDIR)/itcl/configure $(STATIC) $(TCLDIR) $(ITCL_OPTS) && \
+ $(MAKE) install-binaries install-libraries
+
+# end
+#-------------------------------------------------------------------------
+