From 41171be5a6473eeb5de42e3f2c0e20c854d1481a Mon Sep 17 00:00:00 2001 From: hallgren Date: Mon, 25 Apr 2016 14:21:04 +0000 Subject: Fix a problem building the Java binding when creating binary packages Pass -I and -L flags to gcc so that the C run-time system can be found. Also added a line in src/runtime/java/Makefile to install jpgf.jar. --- src/runtime/java/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/runtime/java/Makefile b/src/runtime/java/Makefile index 8310a5720..6bf0d1495 100644 --- a/src/runtime/java/Makefile +++ b/src/runtime/java/Makefile @@ -12,10 +12,10 @@ LIBTOOL = $(if $(shell command -v glibtool 2>/dev/null), glibtool --tag=CC, libt all: libjpgf.la jpgf.jar libjpgf.la: $(patsubst %.c, %.lo, $(C_SOURCES)) - $(LIBTOOL) --mode=link gcc -g -O -o libjpgf.la -shared $^ -rpath $(INSTALL_PATH) -lgu -lpgf -lsg + $(LIBTOOL) --mode=link gcc $(CFLAGS) -g -O -o libjpgf.la -shared $^ -rpath $(INSTALL_PATH) -lgu -lpgf -lsg %.lo : %.c - $(LIBTOOL) --mode=compile gcc -g -O -c -I$(JNI_PATH) -std=c99 -shared $< -o $@ + $(LIBTOOL) --mode=compile gcc $(CFLAGS) -g -O -c -I$(JNI_PATH) -std=c99 -shared $< -o $@ jpgf.jar: $(patsubst %.java, %.class, $(JAVA_SOURCES)) jar -cf $@ org/grammaticalframework/pgf/*.class org/grammaticalframework/sg/*.class @@ -25,6 +25,8 @@ jpgf.jar: $(patsubst %.java, %.class, $(JAVA_SOURCES)) install: libjpgf.la jpgf.jar $(LIBTOOL) --mode=install install -s libjpgf.la $(INSTALL_PATH) + install jpgf.jar $(INSTALL_PATH) + doc: javadoc org.grammaticalframework.pgf org.grammaticalframework.sg -d java-api -- cgit v1.2.3