CC=g++
JAVA_HOME=/usr/lib/jvm/java-6-openjdk
CFLAGS=-c -I$(JAVA_HOME)/include
LFLAGS=-shared
JAVA_FILES=JniFuncMain.java JniTest.java
all: java lib
java:
@echo
@echo Compiling Java codes: ${JAVA_FILES}
@javac ${JAVA_FILES}
@echo
@echo Generating header file for JNI
@javah JniTest
lib:
@echo
@echo Compiling the native codes
@$(CC) ${CFLAGS} jnifunc.cpp
@echo
@echo Building shared library: libjnifunc.so
@$(CC) ${LFLAGS} -o libjnifunc.so jnifunc.o
clean:
@rm -f *.o
@rm -f *.so
@rm -f *.class
'리눅스 & 안드로이드' 카테고리의 다른 글
Android Gingerbread Porting 작업일지 (0) | 2011.01.31 |
---|---|
How to make Android binary images (1) | 2011.01.19 |
VIM(Vi IMproved) settings (0) | 2011.01.17 |
JNI header files path on Mac (0) | 2011.01.17 |
Java 실행 시, library path 설정방법 (0) | 2011.01.17 |