[Pommed-commits] r308 - in trunk: . pommed pommed/pmac

Julien Blache jblache at alioth.debian.org
Sun Apr 15 15:09:34 UTC 2007


Author: jblache
Date: 2007-04-15 15:09:34 +0000 (Sun, 15 Apr 2007)
New Revision: 308

Added:
   trunk/pommed/pmac/ofapi/
Removed:
   trunk/pommed/pmac/oflib/
Modified:
   trunk/INSTALL
   trunk/Makefile
   trunk/pommed/Makefile
   trunk/pommed/pmac/kbd_backlight.c
Log:
Allow building using the system's libofapi.


Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL	2007-04-15 14:42:05 UTC (rev 307)
+++ trunk/INSTALL	2007-04-15 15:09:34 UTC (rev 308)
@@ -16,6 +16,7 @@
  - libconfuse
  - libdbus
  - libasound
+ - libofapi (aka oflib); see below
 
 gpomme requires:
  - libdbus
@@ -34,7 +35,10 @@
  - make gpomme, to build gpomme
  - make wmpomme, to build wmpomme
 
+If you do not have libofapi installed, can't find it or do not want to
+install it, run make pommed OFLIB=1 to use the embedded copy of libofapi.
 
+
 Installing
 ----------
 

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2007-04-15 14:42:05 UTC (rev 307)
+++ trunk/Makefile	2007-04-15 15:09:34 UTC (rev 308)
@@ -1,9 +1,11 @@
 # Top-level Makefile for pommed & tools
 
+OFLIB ?=
+
 all: pommed gpomme wmpomme
 
 pommed:
-	$(MAKE) -C pommed
+	$(MAKE) -C pommed OFLIB=$(OFLIB)
 
 gpomme:
 	$(MAKE) -C gpomme

Modified: trunk/pommed/Makefile
===================================================================
--- trunk/pommed/Makefile	2007-04-15 14:42:05 UTC (rev 307)
+++ trunk/pommed/Makefile	2007-04-15 15:09:34 UTC (rev 308)
@@ -14,18 +14,25 @@
 CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(CONFUSE_CFLAGS)
 
 ifeq ($(ARCH), ppc)
+OFLIB ?=
+
 LDFLAGS = -lz $(DBUS_LIBS) $(ALSA_LIBS) $(CONFUSE_LIBS)
 
 SOURCES = pommed.c cd_eject.c evdev.c conffile.c audio.c dbus.c \
 		pmac/sysfs_backlight.c \
 		pmac/kbd_backlight.c pmac/ambient.c
 
-OF_SOURCES = pmac/oflib/of_externals.c pmac/oflib/of_internals.c \
-		pmac/oflib/of_standard.c
+OF_SOURCES = pmac/ofapi/of_externals.c pmac/ofapi/of_internals.c \
+		pmac/ofapi/of_standard.c
 
 OF_OBJS = $(OF_SOURCES:%.c=%.o)
 
-LIBS = pmac/oflib/oflib.a
+ifneq ($(OFLIB),)
+CFLAGS += -Ipmac
+LIBS = pmac/ofapi/oflib.a
+else
+LDFLAGS += -lofapi
+endif
 
 else
 
@@ -64,14 +71,14 @@
 pmac/ambient.o: pmac/ambient.c ambient.h pommed.h dbus.h
 
 # OFlib
-pmac/oflib/oflib.a: $(OF_OBJS)
+pmac/ofapi/oflib.a: $(OF_OBJS)
 	ar cru $@ $^
 
-pmac/oflib/of_externals.o: pmac/oflib/of_externals.c pmac/oflib/of_api.h
+pmac/ofapi/of_externals.o: pmac/ofapi/of_externals.c pmac/ofapi/of_api.h
 
-pmac/oflib/of_internals.o: pmac/oflib/of_internals.c pmac/oflib/of_api.h
+pmac/ofapi/of_internals.o: pmac/ofapi/of_internals.c pmac/ofapi/of_api.h
 
-pmac/oflib/of_standard.o: pmac/oflib/of_standard.c pmac/oflib/of_api.h
+pmac/ofapi/of_standard.o: pmac/ofapi/of_standard.c pmac/ofapi/of_api.h
 
 
 # Mactel-specific files
@@ -85,5 +92,5 @@
 
 
 clean:
-	rm -f pommed $(OBJS) $(OF_OBJS) pmac/oflib/oflib.a
-	rm -f *~ mactel/*~ pmac/*~ pmac/oflib/*~
+	rm -f pommed $(OBJS) $(OF_OBJS) pmac/ofapi/oflib.a
+	rm -f *~ mactel/*~ pmac/*~ pmac/ofapi/*~

Modified: trunk/pommed/pmac/kbd_backlight.c
===================================================================
--- trunk/pommed/pmac/kbd_backlight.c	2007-04-15 14:42:05 UTC (rev 307)
+++ trunk/pommed/pmac/kbd_backlight.c	2007-04-15 15:09:34 UTC (rev 308)
@@ -35,7 +35,8 @@
 #include <sys/ioctl.h>
 #include <linux/i2c.h>
 
-#include "oflib/of_api.h"
+#include <ofapi/of_api.h>
+
 #include "../pommed.h"
 #include "../conffile.h"
 #include "../kbd_backlight.h"

Copied: trunk/pommed/pmac/ofapi (from rev 300, trunk/pommed/pmac/oflib)




More information about the Pommed-commits mailing list