mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-10 05:29:30 -06:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user