+# NOTE: when installing Tcl and Tk make sure to install the private
+# headers. ie: make; make install install-private-headers
+#include /opt/tcl/lib/tclConfig.sh
+#include /opt/tcl/lib/tkConfig.sh
+
+CC := gcc
+CFLAGS := -g -Wall -fPIC
+LD := gcc
+LDFLAGS := -g -Wall
+RM := rm -f
+
+V := @
+Q := $(V:1=)
+QUIET_CC = $(Q:@=@echo CC $@ &)$(CC)
+QUIET_LD = $(Q:@=@echo LD $@ &)$(LD)
+
+TCL_INSTALL_DIR=/opt/tcl
+
+GTK_INC := $(shell pkg-config --cflags gtk+-2.0)
+GTK_LIBS:= $(shell pkg-config --libs gtk+-2.0)
+TCL_INC := $(shell PKG_CONFIG_PATH=$(TCL_INSTALL_DIR)/lib/pkgconfig pkg-config --cflags tcl tk)
+TCL_LIBS:= $(shell PKG_CONFIG_PATH=$(TCL_INSTALL_DIR)/lib/pkgconfig pkg-config --libs tcl tk)
+DEFS := -DUSE_TCL_STUBS -DUSE_TK_STUBS -DUSE_TTK_STUBS
+
+#_TCL_SRC_DIR=$(TCL_SRC_DIR:\'=)
+#_TK_SRC_DIR=$(TK_SRC_DIR:\'=)
+
+#INC = $(GTK_INC) $(TCL_INCLUDE_SPEC) $(TK_INCLUDE_SPEC) -I$(_TK_SRC_DIR)/generic/ttk
+#LIBS = $(GTK_LIBS) $(TCL_STUB_LIB_SPEC:\'=) $(TK_STUB_LIB_SPEC:\'=)
+INC = $(GTK_INC) $(TCL_INC)
+LIBS = $(GTK_LIBS) $(TCL_LIBS)
+
+libttkgtktheme.so: ttkGtkTheme.o
+ $(QUIET_LD) $(LDFLAGS) -shared -o $@ $< $(LIBS)
+
+ttkGtkTheme.o: ttkGtkTheme.c
+ $(QUIET_CC) $(CFLAGS) $(DEFS) $(INC) -c $< -o $@
+
+shell: libttkgtktheme.so
+ env LD_LIBRARY_PATH=`pwd` $(TCL_INSTALL_DIR)/bin/wish8.7 `which tkcon`
+
+test: libttkgtktheme.so
+ @echo "load $^\nexit 0" | env LD_LIBRARY_PATH=`pwd` $(TCL_INSTALL_DIR)/bin/wish8.7
+
+clean:
+ -@rm -f ttkGtkTheme.o libttkgtktheme.so
+
+.PHONY: clean