# vim: set noexpandtab:
#
# GNU Solfege - eartraining for GNOME
# Copyright (C) 2000, 2001  Tom Cato Amundsen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


depth = ..
name = src

include $(depth)/Makefile.inc

ifeq ($(HAVE_GTKHTML),yes)
all: inithackmodule.so
else
all:
endif

python-installfiles = $(wildcard *.py)
dist_files = Makefile inithack.c configureoutput.py.in $(filter-out configureoutput.py, $(python-installfiles))

inithack.o: inithack.c
	$(CC) -fPIC -c inithack.c -I$(PYTHON_PREFIX)/include/python$(PYTHON_VERSION)
inithackmodule.so: inithack.o
	$(CC) -fPIC -shared inithack.o -o inithackmodule.so -lc -lgtkhtml

install: python-install
ifeq ($(HAVE_GTKHTML),yes)
	$(INSTALL_DATA) inithackmodule.so $(libdir)/$(PACKAGE)/$(VERSION)
endif

uninstall: python-uninstall
ifeq ($(HAVE_GTKHTML),yes)
	rm -f $(libdir)/$(PACKAGE)/$(VERSION)/inithackmodule.so
endif

distclean: clean
	rm configureoutput.py
clean:
	rm -f *.pyc *.pyo inithack.o inithackmodule.so


