# # Copyright(C) 2006 Cameron Rich # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # AXTLS_HOME=../.. include $(AXTLS_HOME)/config/.config include $(AXTLS_HOME)/config/makefile.conf include $(AXTLS_HOME)/config/makefile.java.conf all: lib jar JAR=$(AXTLS_HOME)/$(STAGE)/axtls.jar ifdef CONFIG_PLATFORM_WIN32 TARGET=$(AXTLS_HOME)/$(STAGE)/axtlsj.dll else TARGET=$(AXTLS_HOME)/$(STAGE)/libaxtlsj.so endif lib: $(TARGET) axTLSj_wrap.o : axTLSj_wrap.c JAVA_FILES= \ axtlsjJNI.java \ axtlsjConstants.java \ axtlsj.java \ SSLReadHolder.java \ SSL.java \ SSLUtil.java \ SSLCTX.java \ SSLServer.java \ SSLClient.java OBJ=axTLSj_wrap.o JAVA_CLASSES:=$(JAVA_FILES:%.java=classes/axTLSj/%.class) ifdef CONFIG_PLATFORM_WIN32 LDFLAGS += axtls.lib /libpath:"$(AXTLS_HOME)/$(STAGE)" include $(AXTLS_HOME)/config/makefile.post $(TARGET) : $(OBJ) $(LD) $(LDFLAGS) $(LDSHARED) /out:$@ $(OBJ) else # Not Win32 $(TARGET) : $(OBJ) $(LD) $(LDFLAGS) -L $(AXTLS_HOME)/$(STAGE) $(LDSHARED) -o $@ $(OBJ) -laxtls endif jar: $(OBJ) $(JAR) # if we are doing the samples then defer creating the jar until then $(JAR): $(JAVA_CLASSES) ifndef CONFIG_JAVA_SAMPLES jar cvf $@ -C classes axTLSj else @if [ ! -f $(JAR) ]; then touch $(JAR); fi endif classes/axTLSj/%.class : %.java javac -d classes -classpath classes $^ clean:: @rm -f $(JAR) $(TARGET) SWIG* axtls* *.i *.c @rm -fr classes/*