3
# This file is a part of Java Bindings for Librhash
4
# Copyright (c) 2011, Sergey Basalaev <sbasalaev@gmail.com>
5
# Librhash is (c) 2011, Alexey S Kravchenko <rhash.admin@gmail.com>
7
# Permission is hereby granted, free of charge, to any person obtaining a copy
8
# of this software and associated documentation files (the "Software"), to deal
9
# in the Software without restriction, including without limitation the rights
10
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
# copies of the Software, and to permit persons to whom the Software is
14
# This library is distributed in the hope that it will be useful, but WITHOUT
15
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16
# FOR A PARTICULAR PURPOSE. Use it at your own risk!
26
VERSION = $(shell sed -e 's/.*"\(.*\)".*/\1/' ../../version.h)
35
JAVADOC_API_URL = http://download.oracle.com/javase/6/docs/api/
37
JARFILE = $(DEST_DIR)/rhash-$(VERSION).jar
43
$(JAR) cf $(JARFILE) -C $(CLASSES_DIR) org/
46
ln -s rhash-$(VERSION).jar $(DEST_DIR)/rhash.jar
49
mkdir -p $(CLASSES_DIR)
50
$(JAVAC) -d $(CLASSES_DIR) -sourcepath $(JAVASRC_DIR) `find ${JAVASRC_DIR} -name '*.java'`
52
update-header: compile-classes
53
$(JAVAH) -o $(CSRC_DIR)/bindings.h -classpath $(CLASSES_DIR) org.sf.rhash.Bindings
56
$(MAKE) -C $(CSRC_DIR)
58
cp $(CSRC_DIR)/*rhash-jni* $(DEST_DIR)
60
javadoc: clean-javadoc
61
$(JAVADOC) -windowtitle 'RHash' \
65
-link $(JAVADOC_API_URL)
68
$(JAVAC) -classpath $(JARFILE) $(TEST_DIR)/Test.java
69
$(JAVA) -classpath $(TEST_DIR):$(JARFILE) -Djava.library.path=$(DEST_DIR) Test
71
clean: clean-javadoc clean-jni clean-classes clean-test
80
$(MAKE) -C $(CSRC_DIR) clean
83
rm -f $(TEST_DIR)/*.class
88
.PHONY: jar jni javadoc clean clean-javadoc distclean