~mdz/network-manager/ubuntu.0.7

« back to all changes in this revision

Viewing changes to examples/python/systray/Makefile

  • Committer: clarkbw
  • Date: 2004-08-27 20:48:04 UTC
  • Revision ID: vcs-imports@canonical.com-20040827204804-17ed195edeb66422
004-08-27  Bryan Clark  <bclark@redhat.com>

        * examples/python/systray/trayiconmodule.c:
        * examples/python/systray/trayicon.override:
        * examples/python/systray/network_tray.py:
        * examples/python/systray/eggtrayicon.h:
        * examples/python/systray/eggtrayicon.c:
        * examples/python/systray/Makefile:
        * examples/python/README:
        * examples/python/NetworkManager.py:
        * examples/python/NMTester.py:

        Initial commit of these python example files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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`
 
4
 
 
5
# Build the shared object
 
6
trayicon.so: trayicon.o eggtrayicon.o trayiconmodule.o 
 
7
        $(CC) $(LDFLAGS) -shared $^ -o $@
 
8
 
 
9
 
 
10
# The path to the GTK+ python types
 
11
DEFS=`pkg-config --variable=defsdir pygtk-2.0`
 
12
 
 
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 \
 
19
        trayicon.defs > $@
 
20
 
 
21
trayicon.defs: eggtrayicon.h config.h
 
22
        python \
 
23
        /usr/share/pygtk/2.0/codegen/h2def.py \
 
24
        eggtrayicon.h > trayicon.defs
 
25
 
 
26
config.h:
 
27
        touch config.h
 
28
        ln -s ../NetworkManager.py .
 
29
 
 
30
# A rule to clean the generated files
 
31
clean:
 
32
        rm -f trayicon.so *.o trayicon.c trayicon.defs *~ config.h NetworkManager.py
 
33
 
 
34
.PHONY: clean