## # Makefile for xdtp-java # # $Id: Makefile,v 1.3 2005/10/10 17:17:19 ozawa Exp $ # # Copyright (C) 2005- ONGS Inc. # All Rights Reserved. # # Author: Masanori OZAWA (ozawa@ongs.co.jp) # # Last modified: $Author: ozawa $ $Date: 2005/10/10 17:17:19 $ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY ONGS INC ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL ONGS INC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # The views and conclusions contained in the software and documentation are # those of the authors and should not be interpreted as representing official # policies, either expressed or implied, of the ONGS Inc. # ## .include "../Makefile.inc" ## Check JDK version # JV != java -version 2>&1 | \ grep 'version' | \ awk '{print substr($$0, match($$0, "[0-9][.][0-9][.][0-9]"), 3) }' .if ${JV} < 1.4 .error You need JDK 1.4.x or later. .endif ## Set build variables # TARGET = xdtp.jar OPTION = -deprecation -classpath . -encoding EUCJIS JAVAC ?= javac JAR ?= jar SRC != find ./jp -name "*.java" | sort | grep -v "CVS" | sed 's/^[.][/]//g' OBJ = ${SRC:.java=.class} ## Set SUFFIXES # SUFFIXES = .java .class .SUFFIXES: ${SUFFIXES} ## build targets # all: build build: ${TARGET} library ${TARGET}: ${OBJ} ${JAR} cvf ${TARGET} ${OBJ} .java.class: ${JAVAC} ${OPTION} $< library: cd lib && ${MAKE} ${.MAKEFLAGS} build install: cd lib && ${MAKE} ${.MAKEFLAGS} $@ ${INSTALL} -c -o root -g wheel -m 644 ${TARGET} ${XDTPSHARE}/ clean: rm -f ${OBJ} ${TARGET} cd lib && ${MAKE} ${.MAKEFLAGS} $@