1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22# Builds the Java Storage test example of the SDK. 23 24PRJ=../../.. 25SETTINGS=$(PRJ)/settings 26 27include $(SETTINGS)/settings.mk 28include $(SETTINGS)/std.mk 29include $(SETTINGS)/dk.mk 30 31# Define non-platform/compiler specific settings 32COMPONENT_NAME=JavaStorageTestExample 33OUT_COMP_CLASS = $(OUT_CLASS)/$(COMPONENT_NAME) 34 35JAVAFILES = \ 36 StorageFunctionality.java \ 37 TestHelper.java \ 38 StorageTest.java \ 39 Test01.java \ 40 Test02.java \ 41 Test03.java \ 42 Test04.java \ 43 Test05.java \ 44 Test06.java \ 45 Test07.java \ 46 Test08.java \ 47 Test09.java 48 49CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES)) 50 51SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\ 52 $(PATH_SEPARATOR)$(OUT_COMP_CLASS)) 53 54 55# Targets 56.PHONY: ALL 57ALL : \ 58 JavaStorageTestExample 59 60include $(SETTINGS)/stdtarget.mk 61 62$(CLASSFILES) : $(JAVAFILES) 63 -$(MKDIR) $(subst /,$(PS),$(@D)) 64 $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES) 65 66JavaStorageTestExample : $(CLASSFILES) 67 @echo -------------------------------------------------------------------------------- 68 @echo Please use following command to execute the example! 69 @echo ------ 70 @echo $(MAKE) StorageFunctionality.run 71 @echo -------------------------------------------------------------------------------- 72 73%.run: $(OUT_COMP_CLASS)/%.class 74 $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(basename $@) 75 76.PHONY: clean 77clean : 78 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS)) 79 80