Added old (obsolete ?) stuff from svn
[gpm-metux.git] / Makefile
blobd633abaefb3c1ae6b55d00078ece8c83771c6617
3 PKG_CONFIG?=pkg-config
4 JAVAC?=javac
5 JAVAH?=javah
7 MVFS_CFLAGS=`$(PKG_CONFIG) --cflags`
8 MVFS_LIBS=`$(PKG_CONFIG) --libs`
10 JAVA_SRCS=\
11 metux/espresso9/NativeFS.java \
12 testme.java
14 JAVA_CLS=\
15 classes/metux/espresso9/NativeFS.class \
16 classes/metux/espresso9/File.class \
17 classes/metux/espresso9/Stat.class
19 NATIVE_CLASSES=\
20 metux.espresso9.NativeFS
22 JNI_SRC=espresso9_jni.c
23 JNI_OBJ=espresso9_jni.o
24 JNI_SO=libjava-rlt-espresso9.so
25 JNI_HDR=metux_espresso9_NativeFS.h
27 all: build-classes build-native
29 build-classes: clean $(JAVA_CLS)
31 $(JAVA_CLS): $(JAVA_SRCS)
32 mkdir -p classes/metux/espresso9
33 $(JAVAC) -cp . $(JAVA_SRCS)
34 mv metux/espresso9/*.class classes/metux/espresso9
36 metux_espresso9_NativeFS.h: classes/metux/espresso9/NativeFS.class
37 $(JAVAH) -classpath "classes" metux.espresso9.NativeFS
39 $(JNI_OBJ): $(JNI_SRC) $(JNI_HDR)
40 $(CC) $(MVFS_CFLAGS) -c $(JNI_SRC) -o $(JNI_OBJ)
42 $(JNI_SO): $(JNI_OBJ)
43 $(LD) -shared $(JNI_OBJ) -o $(JNI_SO) $(MVFS_LIBS)
45 build-native: $(JNI_OBJ) $(JNI_SO)
47 clean:
48 find -name "*.class" -exec "rm" "{}" ";"
49 rm -Rf classes
51 run:
52 java -Djava.library.path=. -classpath "classes:." testme
54 espresso9.jar:
55 jar cvf espresso9.jar mymanifest -C classes