Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 144968
Collapse All | Expand All

(-)src/Makefile (-4 / +7 lines)
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 \
(-)src/common/Makefile (-6 / +6 lines)
Lines 6-24 Link Here
6
6
7
ifeq ($(HAVE_XSCRNSAVER),YES)
7
ifeq ($(HAVE_XSCRNSAVER),YES)
8
# We link with libXScrnsaver from modular X.Org X11
8
# We link with libXScrnsaver from modular X.Org X11
9
CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0 xscrnsaver` -fpic -I/usr/include/python$(PYTHONVER) -I.
9
gtk_and_x_CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0 xscrnsaver` -fpic -I/usr/include/python$(PYTHONVER) -I.
10
LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0 xscrnsaver` -lpython$(PYTHONVER)
10
gtk_and_x_LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0 xscrnsaver` -lpython$(PYTHONVER)
11
else
11
else
12
# # We link with libXScrnsaver from monolithic X.Org X11
12
# # We link with libXScrnsaver from monolithic X.Org X11
13
CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fpic -I/usr/include/python$(PYTHONVER) -I.
13
gtk_and_x_CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fpic -I/usr/include/python$(PYTHONVER) -I.
14
LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0` -L/usr/X11R6$(LIBDIR) -lX11 \
14
gtk_and_x_LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0` \
15
	-lXss -lXext -lpython$(PYTHONVER)
15
	-L/usr/X11R6$(LIBDIR) -lX11 -lXss -lXext -lpython$(PYTHONVER)
16
endif
16
endif
17
17
18
all: idle.so
18
all: idle.so
19
19
20
idle.so:
20
idle.so:
21
	$(CC) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -shared idle.c $^ -o $@
21
	$(CC) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) $(gtk_and_x_CFLAGS) $(gtk_and_x_LDFLAGS) -shared idle.c $^ -o $@
22
22
23
clean:
23
clean:
24
	rm -f *.so
24
	rm -f *.so

Return to bug 144968