diff -Nur libmatthew-java-0.7.1/Makefile libmatthew-java-0.7.1_patched/Makefile --- libmatthew-java-0.7.1/Makefile 2008-06-23 00:59:13.000000000 +0300 +++ libmatthew-java-0.7.1_patched/Makefile 2008-07-19 16:02:43.000000000 +0300 @@ -6,20 +6,19 @@ CC?=gcc LD?=ld PPFLAGS+=-C -P -CFLAGS+=-fpic -Wall -Os -pedantic -std=c99 -Werror +CFLAGS+=-fPIC -Wall -pedantic -std=c99 GCJFLAGS+=-fjni JCFLAGS+=-source 5.0 -INCLUDES+=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux +INCLUDES=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux JAVADOCFLAGS?=-quiet -author -link http://java.sun.com/j2se/1.4.2/docs/api/ LDVER?=$(shell ld -v | cut -d' ' -f1) UNAME?=$(shell uname -s) ifeq ($(LDVER),GNU) -LDFLAGS+=-fpic -shared -lc -else -LDFLAGS+=-lc +LDFLAGS+=-fpic -shared endif +LDLIBS=-lc PREFIX?=/usr/local JARDIR?=$(PREFIX)/share/java @@ -57,12 +56,7 @@ io-$(IOVER).jar: .classes (cd classes; $(JAR) cf ../$@ cx/ath/matthew/io/*class) unix-$(UNIXVER).jar: .classes -ifeq ($(DEBUG),enable) - echo "Class-Path: $(JARDIR)/debug-$(DEBUG).jar" > Manifest -else - echo "Class-Path: " > Manifest -endif - (cd classes; $(JAR) cfm ../$@ ../Manifest cx/ath/matthew/unix/*class) + (cd classes; $(JAR) cf ../$@ cx/ath/matthew/unix/*class) hexdump-$(HEXVER).jar: .classes (cd classes; $(JAR) cf ../$@ cx/ath/matthew/utils/Hexdump.class) @@ -70,7 +64,7 @@ %.o: %.c %.h $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< lib%.so: %.o - $(LD) $(LDFLAGS) -o $@ $< + $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS) unix-java.h: .classes $(JAVAH) -classpath classes -o $@ cx.ath.matthew.unix.UnixServerSocket cx.ath.matthew.unix.UnixSocket cx.ath.matthew.unix.USInputStream cx.ath.matthew.unix.USOutputStream cgi-java.h: .classes @@ -85,11 +79,11 @@ tar zcf $@ libmatthew-java-$(MATTVER) debug-enable-$(DEBUGVER).jar: cx/ath/matthew/debug/Debug.jpp - make .enabledebug + $(MAKE) .enabledebug echo "Class-Path: $(JARDIR)/hexdump.jar" > Manifest (cd classes;jar cfm ../$@ ../Manifest cx/ath/matthew/debug/*.class) debug-disable-$(DEBUGVER).jar: cx/ath/matthew/debug/Debug.jpp - make .disabledebug + $(MAKE) .disabledebug echo "Class-Path: $(JARDIR)/hexdump.jar" > Manifest (cd classes;jar cfm ../$@ ../Manifest cx/ath/matthew/debug/*.class) .enabledebug: cx/ath/matthew/debug/Debug.jpp