-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (23 loc) · 807 Bytes
/
Makefile
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
LIBJVM = $(shell find ${JAVA_HOME}/ -name libjvm* | head -n 1)
LIBJVM_PATH = $(shell dirname $(LIBJVM))
OS = $(shell uname)
LIBHDFS =
INCLUDE_DIRS =
ifeq ($(OS), Linux)
LIBHDFS = -L/usr/lib -L/usr/lib/hadoop/lib/native -L/opt/cloudera/parcels/CDH/lib/hadoop/lib/native
INCL = -I/usr/include -I/opt/cloudera/parcels/CDH/include
endif
pipefish: pipefish.c java_home
gcc -Wall -O2 -ggdb pipefish.c -o pipefish `mysql_config --include` $(INCL) $(LIBHDFS) -lhdfs `mysql_config --libs` -L$(LIBJVM_PATH) -ljvm
.PHONY : clean
clean:
rm -rf pipefish pipefish.dSYM hdfs.h
.PHONY : install
install:
install pf /usr/local/bin/pf
install pipefish /usr/local/bin/pipefish
install pipefish_classpath /usr/local/bin/pipefish_classpath
.PHONY : java_home
java_home:
# Is JAVA_HOME set?
test -n "${JAVA_HOME}"