use pkg-config xscrnsaver in correct Makefile, thx Dawid

This commit is contained in:
Yann Leboulanger 2006-02-01 23:02:57 +00:00
parent 1d5c383095
commit 751299c0a1
2 changed files with 14 additions and 13 deletions

View File

@ -1,16 +1,7 @@
# Set the C flags to include the GTK+ and Python libraries
PYTHONVER = `python -c 'import sys; print sys.version[:3]'`
HAVE_XSCRNSAVER = $(shell pkg-config --exists xscrnsaver && echo 'YES')
ifeq ($(HAVE_XSCRNSAVER),YES)
# We link with libXScrnsaver from modular X.Org X11
CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0 xscrnsaver` -fpic -I/usr/include/python$(PYTHONVER) -I.
LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0 xscrnsaver`
else
# We link with libXScrnsaver from monolithic X.Org X11
CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fpic -I/usr/include/python$(PYTHONVER) -I.
LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0` -L/usr/X11R6$(LIBDIR) -lX11 -lXss -lXext
endif
CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fPIC -I/usr/include/python$(PYTHONVER) -I.
LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0`
all: trayicon.so gtkspell.so

View File

@ -1,12 +1,22 @@
# Set the C flags to include the GTK+ and Python libraries
PYTHONVER = `python -c 'import sys; print sys.version[:3]'`
HAVE_XSCRNSAVER = $(shell pkg-config --exists xscrnsaver && echo 'YES')
ifeq ($(HAVE_XSCRNSAVER),YES)
# We link with libXScrnsaver from modular X.Org X11
CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0 xscrnsaver` -fpic -I/usr/include/python$(PYTHONVER) -I.
LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0 xscrnsaver`
else
# # We link with libXScrnsaver from monolithic X.Org X11
CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fpic -I/usr/include/python$(PYTHONVER) -I.
LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0`
LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0` -L/usr/X11R6$(LIBDIR) -lX11 -lXss -lXext
# endif
all: idle.so
idle.so:
$(CC) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -shared idle.c $^ -o $@ -L/usr/X11R6$(LIBDIR) -lX11 -lXss -lXext
$(CC) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -shared idle.c $^ -o $@
clean:
rm -f *.so