1
# Set the C flags to include the GTK+ and Python libraries
2
CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -I/usr/include/python2.3/ -I.
3
LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0`
5
# Build the shared object
6
trayicon.so: trayicon.o eggtrayicon.o trayiconmodule.o
7
$(CC) $(LDFLAGS) -shared $^ -o $@
10
# The path to the GTK+ python types
11
DEFS=`pkg-config --variable=defsdir pygtk-2.0`
13
# Generate the C wrapper from the defs and our override file
14
trayicon.c: trayicon.defs trayicon.override
15
pygtk-codegen-2.0 --prefix trayicon \
16
--register $(DEFS)/gdk-types.defs \
17
--register $(DEFS)/gtk-types.defs \
18
--override trayicon.override \
21
trayicon.defs: eggtrayicon.h config.h
23
/usr/share/pygtk/2.0/codegen/h2def.py \
24
eggtrayicon.h > trayicon.defs
28
ln -s ../NetworkManager.py .
30
# A rule to clean the generated files
32
rm -f trayicon.so *.o trayicon.c trayicon.defs *~ config.h NetworkManager.py