Skip to content
Snippets Groups Projects
Makefile 1.05 KiB
Newer Older
# Set the C flags to include the GTK+ and Python libraries
PYTHON ?= python
PYTHONVER = `$(PYTHON) -c 'import sys; print sys.version[:3]'`
CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fPIC -I/usr/include/python$(PYTHONVER) -I.
LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0` -lpython$(PYTHONVER)
nkour's avatar
nkour committed
all: trayicon.so gtkspell.so
nkour's avatar
nkour committed
# Build the shared objects
trayicon.so: trayicon.o eggtrayicon.o trayiconmodule.o
nkour's avatar
nkour committed
gtkspell.so:
	$(CC) $(OPTFLAGS) $(CFLAGS)   `pkg-config --cflags gtkspell-2.0` -shared gtkspellmodule.c $^ -o $@ $(LDFLAGS) `pkg-config --libs gtkspell-2.0` 

# The path to the GTK+ python types
DEFS=`pkg-config --variable=defsdir pygtk-2.0`

# Generate the C wrapper from the defs and our override file
trayicon.c: trayicon.defs trayicon.override
	pygtk-codegen-2.0 --prefix trayicon \
	--register $(DEFS)/gdk-types.defs \
	--register $(DEFS)/gtk-types.defs \
	--override trayicon.override \
	trayicon.defs > $@

nkour's avatar
nkour committed
	rm -f trayicon.so *.o trayicon.c gtkspell.so *~