Created
November 9, 2014 05:33
-
-
Save sheimi/09ff96da264abb94149e to your computer and use it in GitHub Desktop.
code in blog.sheimi.me: 2012-09-05-a-summary-of-using-jni (3)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makefile | |
# FOR MAC | |
CC=g++ | |
SEARCH_LIB=-lopencv_core -lopencv_highgui | |
INCLUDE=-I/usr/local/include -I$(JAVA_INCLUDE) | |
LIBRARY=-L/usr/local/lib | |
FLAGS= -m64 -dynamiclib -fPIC | |
OUT=libcvjni.jnilib | |
SRC=cvjni.cpp | |
mac: | |
$(CC) $(FLAGS) $(LIBRARY) $(SEARCH_LIB) $(INCLUDE) $(SRC) -o $(OUT) | |
# FOR LINUX | |
CC=g++ | |
CV_PATH=/usr/local/lib | |
SEARCH_LIB=$(CV_PATH)/libopencv_core.so $(CV_PATH)/libopencv_highgui.so | |
INCLUDE=-I/usr/local/include -I$(JAVA_INCLUDE) -I$(JAVA_INCLUDE)/linux | |
LIBRARY=-L/usr/local/lib | |
OUT=libcvjni.so | |
SRC=cvjni.cpp | |
FLAGS= -m64 -shared -fPIC | |
all: | |
$(CC) $(FLAGS) $(SRC) $(SEARCH_LIB) -o $(OUT) $(INCLUDE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment