2005-05-06 14:06:10 +02:00
|
|
|
# Set the C flags to include the GTK+ and Python libraries
|
2005-06-06 12:09:48 +02:00
|
|
|
PYTHONVER = `python -c 'import sys; print sys.version[:3]'`
|
2006-02-02 00:02:57 +01:00
|
|
|
|
|
|
|
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
|
2005-05-06 14:06:10 +02:00
|
|
|
CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fpic -I/usr/include/python$(PYTHONVER) -I.
|
2006-02-02 00:02:57 +01:00
|
|
|
LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0` -L/usr/X11R6$(LIBDIR) -lX11 -lXss -lXext
|
2006-02-02 00:04:04 +01:00
|
|
|
endif
|
2005-05-06 14:06:10 +02:00
|
|
|
|
|
|
|
all: idle.so
|
|
|
|
|
|
|
|
idle.so:
|
2006-02-02 00:02:57 +01:00
|
|
|
$(CC) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -shared idle.c $^ -o $@
|
2004-06-09 16:26:54 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.so
|
|
|
|
rm -rf build
|