Source: oflib
Version: 0git20070620-9
Tags: patch upstream
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

oflib fails to cross build from source, because the upstream Makefiles
hard code the build architecture pkg-config. I'm attaching a patch that
makes gcc substitutable and oflib cross buildable. Please consider
applying it.

Helmut
--- oflib-0git20070620.orig/Makefile
+++ oflib-0git20070620/Makefile
@@ -8,11 +8,11 @@
 CFLAGS += -g -Wall -O2
 
 default:
-	gcc $(CFLAGS) -D_REENTRANT -DPIC -fpic  -Wl,-z,relro -Wl,-soname -Wl,$(SONAME) lib/*.c -shared -o $(SOVERSION)
+	$(CC) $(CFLAGS) -D_REENTRANT -DPIC -fpic  -Wl,-z,relro -Wl,-soname -Wl,$(SONAME) lib/*.c -shared -o $(SOVERSION)
 
-	gcc $(CFLAGS) -c lib/of_externals.c -o lib/of_externals.o
-	gcc $(CFLAGS) -c lib/of_internals.c -o lib/of_internals.o
-	gcc $(CFLAGS) -c lib/of_standard.c -o lib/of_standard.o
+	$(CC) $(CFLAGS) -c lib/of_externals.c -o lib/of_externals.o
+	$(CC) $(CFLAGS) -c lib/of_internals.c -o lib/of_internals.o
+	$(CC) $(CFLAGS) -c lib/of_standard.c -o lib/of_standard.o
 
 	ar cru libofapi.a lib/*.o
 	ranlib libofapi.a
--- oflib-0git20070620.orig/example/Makefile
+++ oflib-0git20070620/example/Makefile
@@ -2,7 +2,7 @@
 all: $(BINARIES)
 
 %: %.c
-	gcc -std=c99 -lofapi $< -o $@
+	$(CC) -std=c99 -lofapi $< -o $@
 clean:
 	rm -f $(BINARIES)
 

Reply via email to