Skip to content

Commit

Permalink
tweaks to get standard java going.
Browse files Browse the repository at this point in the history
gcj compilation is broken.
  • Loading branch information
Eric Hanchrow committed Apr 8, 2010
1 parent b96d956 commit f4eb5cb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions java/Makefile
@@ -1,9 +1,10 @@
USE_GCJ := yes
USE_GCJ := no

ifdef USE_GCJ
ifeq ($(USE_GCJ), yes)
GCJH := gcjh-4.3
JAVA := gij
JAVAC := /usr/bin/javac
JAVAH := gcjh -jni
JAVAH := $(GCJH) -jni
else
JAVA := java
JAVAC := javac
Expand All @@ -13,7 +14,7 @@ endif
CLASSES := HelloWorld CallBack
LIB := Hello

ifdef USE_GCJ
ifeq ($(USE_GCJ), yes)
# Unfortunately if I simply say `gcj HelloWorld.java' it complains
# about `Cannot find class "CallBack" [JLS 8]'
$(word 1,$(CLASSES)).class: $(patsubst %,%.java,$(CLASSES))
Expand All @@ -29,7 +30,7 @@ endif
lib%.so: %.o
$(CC) $(LDFLAGS) $^ -shared -o $@

CPPFLAGS:= -I/usr/local/include -I/usr/local/include/linux
CPPFLAGS:= -I/usr/local/include -I/usr/local/include/linux -I/usr/lib/jvm/java-6-openjdk/include
LDFLAGS := -shared

all: $(patsubst %,%.class,$(CLASSES)) lib$(LIB).so
Expand Down

0 comments on commit f4eb5cb

Please sign in to comment.