Skip to content

Commit

Permalink
macOS support, fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Aug 17, 2020
1 parent ea3643d commit 5dbabc2
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ src/tools/msgdiff
src/tools/mvtag
src/verga/verga
stamp-h1
tcl8.6.*/
tk8.6.*/
ylwrap
37 changes: 37 additions & 0 deletions Makefile.macos
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
DESTDIR = $(HOME)/opt/tkgate
X11DIR = /opt/X11

TAR = tar
TCL = tcl8.6.10
TK = tk8.6.10

.PHONY: install
all: src/tkgate/tkgate

.PHONY: install
install:
$(MAKE) -C install

configure: autogen.sh $(DESTDIR)/lib/libtcl8.6.dylib $(DESTDIR)/lib/libtk8.6.dylib
sh autogen.sh

config.h: configure
./configure --prefix=$(DESTDIR) --with-x --x-includes=$(X11DIR)/include --x-libraries=$(X11DIR)/lib TKGATE_TCLTK_VERSIONS=8.6 TKGATE_INCDIRS="$(X11DIR)/include $(DESTDIR)/include" TKGATE_LIBDIRS="$(X11DIR)/lib $(DESTDIR)/lib"

src/tkgate/tkgate: config.h

$(TCL)/unix/configure: $(TCL)-src.tar.gz
$(TAR) xfz $<
touch $@

$(DESTDIR)/lib/libtcl8.6.dylib: $(TCL)/unix/configure
sh -c 'cd $(TCL)/unix && ./configure --prefix=$(DESTDIR)'
$(MAKE) -C $(TCL)/unix install

$(TK)/unix/configure: $(TK)-src.tar.gz
$(TAR) xfz $<
touch $@

$(DESTDIR)/lib/libtk8.6.dylib: $(TK)/unix/configure
sh -c 'cd $(TK)/unix && ./configure --prefix=$(DESTDIR) --with-tcl=$(DESTDIR)/lib --with-x --x-includes=$(X11DIR)/include --x-libraries=$(X11DIR)/lib'
$(MAKE) -C $(TK)/unix install
Binary file added tcl8.6.10-src.tar.gz
Binary file not shown.
Binary file added tk8.6.10-src.tar.gz
Binary file not shown.

0 comments on commit 5dbabc2

Please sign in to comment.