|
Revision 3438, 1.0 kB
(checked in by nk, 3 years ago)
|
|
emot fix in config.py; overwites in srcmakefile and commonmakefile
|
| Line | |
|---|
| 1 | # Set the C flags to include the GTK+ and Python libraries |
|---|
| 2 | PYTHONVER = `python -c 'import sys; print sys.version[:3]'` |
|---|
| 3 | CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fPIC -I/usr/include/python$(PYTHONVER) -I. |
|---|
| 4 | LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0` |
|---|
| 5 | |
|---|
| 6 | all: trayicon.so gtkspell.so |
|---|
| 7 | |
|---|
| 8 | # Build the shared objects |
|---|
| 9 | trayicon.so: trayicon.o eggtrayicon.o trayiconmodule.o |
|---|
| 10 | $(CC) $(LDFLAGS) -shared $^ -o $@ |
|---|
| 11 | |
|---|
| 12 | gtkspell.so: |
|---|
| 13 | $(CC) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) `pkg-config --libs --cflags gtkspell-2.0` -shared gtkspellmodule.c $^ -o $@ |
|---|
| 14 | |
|---|
| 15 | # The path to the GTK+ python types |
|---|
| 16 | DEFS=`pkg-config --variable=defsdir pygtk-2.0` |
|---|
| 17 | |
|---|
| 18 | # Generate the C wrapper from the defs and our override file |
|---|
| 19 | trayicon.c: trayicon.defs trayicon.override |
|---|
| 20 | pygtk-codegen-2.0 --prefix trayicon \ |
|---|
| 21 | --register $(DEFS)/gdk-types.defs \ |
|---|
| 22 | --register $(DEFS)/gtk-types.defs \ |
|---|
| 23 | --override trayicon.override \ |
|---|
| 24 | trayicon.defs > $@ |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | # A rule to clean the generated files |
|---|
| 28 | clean: |
|---|
| 29 | rm -f trayicon.so *.o trayicon.c gtkspell.so *~ |
|---|
| 30 | |
|---|
| 31 | .PHONY: clean |
|---|