Lines 1-21
Link Here
|
1 |
# Set the C flags to include the GTK+ and Python libraries |
1 |
# Set the C flags to include the GTK+ and Python libraries |
2 |
PYTHON ?= python |
2 |
PYTHON ?= python |
3 |
PYTHONVER = `$(PYTHON) -c 'import sys; print sys.version[:3]'` |
3 |
PYTHONVER = `$(PYTHON) -c 'import sys; print sys.version[:3]'` |
4 |
CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fPIC -I/usr/include/python$(PYTHONVER) -I. |
4 |
gtk_CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fPIC -I/usr/include/python$(PYTHONVER) -I. |
5 |
LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0` -lpython$(PYTHONVER) |
5 |
gtk_LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0` -lpython$(PYTHONVER) |
6 |
|
6 |
|
7 |
all: trayicon.so gtkspell.so |
7 |
all: trayicon.so gtkspell.so |
8 |
|
8 |
|
9 |
# Build the shared objects |
9 |
# Build the shared objects |
10 |
trayicon.so: trayicon.o eggtrayicon.o trayiconmodule.o |
10 |
trayicon.so: trayicon.o eggtrayicon.o trayiconmodule.o |
11 |
$(CC) $(LDFLAGS) -shared $^ -o $@ |
11 |
$(CC) -shared $^ -o $@ $(LDFLAGS) $(gtk_LDFLAGS) |
12 |
|
12 |
|
13 |
gtkspell.so: |
13 |
gtkspell.so: |
14 |
$(CC) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) `pkg-config --libs --cflags gtkspell-2.0` -shared gtkspellmodule.c $^ -o $@ |
14 |
$(CC) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) $(gtk_CFLAGS) $(gtk_LDFLAGS) `pkg-config --libs --cflags gtkspell-2.0` -shared gtkspellmodule.c $^ -o $@ |
15 |
|
15 |
|
16 |
# The path to the GTK+ python types |
16 |
# The path to the GTK+ python types |
17 |
DEFS=`pkg-config --variable=defsdir pygtk-2.0` |
17 |
DEFS=`pkg-config --variable=defsdir pygtk-2.0` |
18 |
|
18 |
|
|
|
19 |
%.o: %.c |
20 |
$(CC) -o $@ -c $< $(CFLAGS) $(gtk_CFLAGS) |
21 |
|
19 |
# Generate the C wrapper from the defs and our override file |
22 |
# Generate the C wrapper from the defs and our override file |
20 |
trayicon.c: trayicon.defs trayicon.override |
23 |
trayicon.c: trayicon.defs trayicon.override |
21 |
pygtk-codegen-2.0 --prefix trayicon \ |
24 |
pygtk-codegen-2.0 --prefix trayicon \ |