root/branches/gajim_0.7/src/Makefile

Revision 1231, 0.8 kB (checked in by tab, 4 years ago)

add a "all" target to compile all necessary stuff in src/

Line 
1# Set the C flags to include the GTK+ and Python libraries
2PYTHONVER = `python -V 2>&1 | awk '{print $$2}' | cut -f1,2 -d.`
3CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fpic -I/usr/include/python$(PYTHONVER) -I.
4LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0`
5
6all: trayicon.so
7
8# Build the shared object
9trayicon.so: trayicon.o eggtrayicon.o trayiconmodule.o
10        $(CC) $(LDFLAGS) -shared $^ -o $@
11
12
13# The path to the GTK+ python types
14DEFS=`pkg-config --variable=defsdir pygtk-2.0`
15
16# Generate the C wrapper from the defs and our override file
17trayicon.c: trayicon.defs trayicon.override
18        pygtk-codegen-2.0 --prefix trayicon \
19        --register $(DEFS)/gdk-types.defs \
20        --register $(DEFS)/gtk-types.defs \
21        --override trayicon.override \
22        trayicon.defs > $@
23
24# A rule to clean the generated files
25clean:
26        rm -f trayicon.so *.o trayicon.c *~
27
28.PHONY: clean
Note: See TracBrowser for help on using the browser.