[Pommed-commits] r459 - trunk/pommed
jblache at alioth.debian.org
jblache at alioth.debian.org
Sat May 17 20:37:19 UTC 2008
Author: jblache
Date: 2008-05-17 20:37:19 +0000 (Sat, 17 May 2008)
New Revision: 459
Modified:
trunk/pommed/Makefile
Log:
Support libpci as a shared library; newer libpci versions provide a shared libpci and a pkg-config file.
Modified: trunk/pommed/Makefile
===================================================================
--- trunk/pommed/Makefile 2008-05-09 13:33:55 UTC (rev 458)
+++ trunk/pommed/Makefile 2008-05-17 20:37:19 UTC (rev 459)
@@ -42,15 +42,26 @@
else
-LDFLAGS += -lz -lsmbios
+LIBPCI_SHARED = $(shell pkg-config libpci && echo true || echo false)
+ifeq ($(LIBPCI_SHARED), true)
+ LIBPCI_CFLAGS = $(shell pkg-config libpci --cflags)
+ LIBPCI_LIBS = $(shell pkg-config libpci --libs)
+
+ CFLAGS += $(LIBPCI_CFLAGS)
+ LDFLAGS += $(LIBPCI_LIBS)
+else
+ LIBS = /usr/lib/libpci.a
+ LDFLAGS += -lz
+endif
+
+LDFLAGS += -lsmbios
+
SOURCES = pommed.c cd_eject.c evdev.c conffile.c audio.c \
dbus.c power.c beep.c video.c \
mactel/x1600_backlight.c mactel/gma950_backlight.c \
mactel/nv8600mgt_backlight.c \
mactel/kbd_backlight.c mactel/ambient.c mactel/acpi.c
-
-LIBS = /usr/lib/libpci.a
endif
OBJS = $(SOURCES:%.c=%.o)
More information about the Pommed-commits
mailing list