1 # -*- Mode: makefile; -*- #
13 pkg_config_path := /usr/lib64/pkgconfig:/usr/local/lib/pkgconfig
19 LDFLAGS += -Wl,-rpath=.
23 define possibly_set_java_home
24 ifneq (,$(wildcard $(1)))
29 possible_java_locations := \
30 /usr/lib/jvm/default-java \
31 /usr/lib/jvm/java-1.8.0-openjdk \
32 /usr/lib/jvm/java-8-openjdk-amd64
34 $(foreach x,$(possible_java_locations),$(eval $(call possibly_set_java_home,$(x))))
37 JAVA_HOME ?= /usr/lib/jvm/java-1.8.0-openjdk
38 jvmdir = $(JAVA_HOME)/jre/lib/amd64/server
40 CPPFLAGS += -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
41 LDFLAGS += -L$(jvmdir) -Wl,-rpath,$(jvmdir)