# Generated automatically from Makefile.in by configure.
SHELL = /bin/sh

top_srcdir = .
srcdir = .
prefix = /usr
exec_prefix = /usr
bindir = $(exec_prefix)/bin

CC = gcc
PY_FLAGS = -I$(INCLUDEPY)
X_FLAGS = -I$(X_INCLUDES) -L$(X_LIBS)
LIBS = -lX11 -lm
PYVERSION = 1.5
INCLUDEPY = $(prefix)/include/python$(PYVERSION)
INSTALL = /usr/lib/python1.5/config/install-sh

X_LIBS = /usr/X11R6/lib
X_INCLUDES = /usr/X11R6/include
PY_MOD_DIR = $(exec_prefix)/lib/python1.5/site-packages
PYTHON = /usr/bin/python

sources = stph.c stphmodule.c stph_icons.c
headers = stph.h stph_icons.h

all: stphmodule.so timbar.pyc

stphmodule.so: stph.c stphmodule.c stph_icons.c stph_icons.h stph.h
	$(CC) -Wall -fpic -ggdb -shared $(PY_FLAGS) $(X_FLAGS) $(LIBS) $(sources) -o stphmodule.so

timbar.pyc: timbar.py
	$(PYTHON) -c "import py_compile; py_compile.compile('timbar.py')"

tester: stph.c stph.h tester.c
	$(CC) -Wall -ggdb $(X_FLAGS) $(LIBS) stph.c tester.c -o tester

install: all
	$(INSTALL) -c stphmodule.so $(PY_MOD_DIR)
	$(INSTALL) -c timbar.py $(bindir)
	$(INSTALL) -c timbar.pyc $(bindir)

uninstall:
	/bin/rm -f $(PY_MOD_DIR)/stphmodule.so
	/bin/rm -f $(bindir)/timbar.py
	/bin/rm -f $(bindir)/timbar.pyc

clean: 
	/bin/rm -f stphmodule.so timbar.pyc tester

distclean: clean
	/bin/rm -f config.cache config.log config.status Makefile

distro: distclean
	STPH_VER=stph`find . -name "VERSION*" | awk '{ sub(/[.\/A-Z]*/, ""); print }'`; \
	cd ..; tar zcvf stph-dist/$$STPH_VER.tar.gz --owner=0 --group=0 $$STPH_VER

backup:
	STPH_VER=stph`find . -name "VERSION*" | awk '{ sub(/[.\/A-Z]*/, ""); print }'`; \
	cd ..; tar zcvf stph-bak/$$STPH_VER.tar.gz --owner=0 --group=0 $$STPH_VER