Commit da406bfd authored by Timm Allman's avatar Timm Allman

fix issues that cause mu_refimpl2_new and mu_refimpl2_new_ex to return NULL always (hopefully)

parent d2922b2e
CFLAGS += -std=gnu11
ifndef JAVA_HOME ifndef JAVA_HOME
$(error JAVA_HOME is required. Invoke with 'make JAVA_HOME=/path/to/java/home') $(error JAVA_HOME is required. Invoke with 'make JAVA_HOME=/path/to/java/home')
endif endif
CFLAGS += -I $(JAVA_HOME)/include CFLAGS += -std=gnu11 -g -I $(JAVA_HOME)/include
ifndef OS ifndef OS
uname := $(shell uname) uname := $(shell uname)
ifeq ($(uname),Darwin) ifeq ($(uname),Darwin)
OS = OSX OS = OSX
else else ifeq ($(uname),Linux)
ifeq ($(uname),Linux) OS = LINUX
OS = LINUX
else else
$(error Unrecognized operating system $(uname). I currently only worked on OSX and Linux.) $(error Unrecognized operating system $(uname). I currently only worked on OSX and Linux.)
endif
endif endif
endif endif
ifeq ($(OS),OSX) ifeq ($(OS),OSX)
CFLAGS += -I $(JAVA_HOME)/include/darwin CFLAGS += -I $(JAVA_HOME)/include/darwin
LDFLAGS += -L $(JAVA_HOME)/jre/lib/server -l jvm -rpath $(JAVA_HOME)/jre/lib/server -install_name '@rpath/libmurefimpl2start.so' LDFLAGS += -L $(JAVA_HOME)/jre/lib/server -l jvm -rpath $(JAVA_HOME)/jre/lib/server -install_name '@rpath/libmurefimpl2start.so'
else ifeq ($(OS),LINUX)
CFLAGS += -I $(JAVA_HOME)/include/linux
LDFLAGS += -Wl,--no-as-needed -L $(JAVA_HOME)/jre/lib/amd64/server -l jvm -Wl,-rpath,$(JAVA_HOME)/jre/lib/amd64/server
endif endif
ifeq ($(OS),LINUX)
CFLAGS += -I $(JAVA_HOME)/include/linux
LDFLAGS += -Wl,--no-as-needed -L $(JAVA_HOME)/jre/lib/amd64/server -l jvm -Wl,-rpath,$(JAVA_HOME)/jre/lib/amd64/server
endif
.PHONY: all .PHONY: all
all: libs tests all: libs tests
...@@ -56,10 +49,8 @@ test_client2: test_client2.c libmurefimpl2start.so ...@@ -56,10 +49,8 @@ test_client2: test_client2.c libmurefimpl2start.so
$(CC) `./refimpl2-config --istart --cflags --libs` -o $@ $< $(CC) `./refimpl2-config --istart --cflags --libs` -o $@ $<
.PHONY: clean veryclean .PHONY: clean veryclean
clean: clean:
rm *.so test_client test_client2 rm -f *.so test_client test_client2
veryclean: veryclean: clean
rm *.so test_client test_client2 classpath.txt classpath.h rm -f classpath.txt classpath.h ../classpath.txt
rm ../classpath.txt
...@@ -36,8 +36,4 @@ if '--istart' in args: ...@@ -36,8 +36,4 @@ if '--istart' in args:
whereami, whereami), end="") whereami, whereami), end="")
else: else:
if '--cflags' in args: if '--cflags' in args:
print("-I {} ".format(whereami), end="") print("-I {} ".format(whereami), end="")
if '--libs' in args: \ No newline at end of file
pass
...@@ -21,7 +21,7 @@ const char *gc_conf = ...@@ -21,7 +21,7 @@ const char *gc_conf =
"vmLog=DEBUG\n" "vmLog=DEBUG\n"
; ;
const char *boot_image_name = "test_client2_bootimg.mu"; char *boot_image_name = "test_client2_bootimg.mu";
int *muerrno; int *muerrno;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment