-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.mk
47 lines (40 loc) · 933 Bytes
/
config.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
LIBALF_PREFIX?=/usr/local
LIBALF_LIBDIR?=$(subst \,/,${LIBALF_PREFIX})/lib
LIBALF_INCLUDE?=$(subst \,/,${LIBALF_PREFIX})/include
JAVA_INCLUDE = $(subst \,/,${JAVA_HOME})/include
ifndef OS
OS=$(shell uname -s)
endif
ifeq (${OS}, Windows_NT) # Windows
LIBEXT=dll
LDFLAGS+=-lws2_32
JNI_INCLUDE = ${JAVA_INCLUDE}/win32
else ifeq (${OS}, Darwin) # Mac OS
LIBEXT=dylib
JNI_INCLUDE = ${JAVA_INCLUDE}/darwin
else ifeq (${OS}, Linux) # Linux
LIBEXT=so
JNI_INCLUDE = ${JAVA_INCLUDE}/linux
else
$(error Unsupported operating system ${OS})
endif
# Skip lib prefix on Windows
ifeq (${OS}, Windows_NT)
LIBPREFIX=
else
LIBPREFIX=lib
endif
# Use ginstall in Mac OS X, only use strip -x
ifeq (${OS}, Darwin)
INSTALL?=ginstall
STRIPFLAGS=-x
else
INSTALL?=install
STRIPFLAGS=--strip-unneeded
endif
# ldconfig needs to be run on Linux
ifeq (${OS}, Linux)
RUN_LDCONFIG=test `id -u` -eq 0 && /sbin/ldconfig
else
RUN_LDCONFIG=
endif