ee6846b78d4d6571487eebaf715c3a4e9566151e
[nit.git] / contrib / jwrapper / examples / java_api / Makefile
1 RT_JAR ?= /usr/lib/jvm/default-java/jre/lib/rt.jar
2
3 all: api_user
4
5 java_api.nit:
6 mkdir -p tmp
7 ../../bin/jwrapper -vv -u comment -o java_api.nit $(RT_JAR) \
8 -r "^(java|org)" -i ../../../../lib/java/collections.nit
9 echo "+ Disabled functions: `grep '#\s*fun' $@ | wc -l` / `grep '^\s*fun' $@ | wc -l`"
10
11 api_user: java_api.nit
12 # Using --semi-global makes it much faster
13 time -f "%E k:%S u:%U" ../../../../bin/nitc -v api_user.nit --semi-global
14
15 check: api_user
16 ./api_user > api_user.res
17 diff api_user.sav api_user.res
18
19 check-generated-java: java_api.nit
20 # This may take a while...
21 time -f "%E k:%S u:%U" ../../../../bin/nitc -v api_user.nit --no-cc
22
23 # Don't compile the C only the Java
24 make -C nit_compile Nit_rt.class
25
26 .PHONY: api_user java_api.nit