xref: /trunk/main/odk/examples/java/Storage/Makefile (revision cdf0e10c)
1# Builds the Java Storage test example of the SDK.
2
3PRJ=../../..
4SETTINGS=$(PRJ)/settings
5
6include $(SETTINGS)/settings.mk
7include $(SETTINGS)/std.mk
8include $(SETTINGS)/dk.mk
9
10# Define non-platform/compiler specific settings
11COMPONENT_NAME=JavaStorageTestExample
12OUT_COMP_CLASS = $(OUT_CLASS)/$(COMPONENT_NAME)
13
14JAVAFILES  = \
15	StorageFunctionality.java \
16	TestHelper.java \
17	StorageTest.java \
18	Test01.java \
19	Test02.java \
20	Test03.java \
21	Test04.java \
22	Test05.java \
23	Test06.java \
24	Test07.java \
25	Test08.java \
26	Test09.java
27
28CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
29
30SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
31		$(PATH_SEPARATOR)$(OUT_COMP_CLASS))
32
33
34# Targets
35.PHONY: ALL
36ALL : \
37    JavaStorageTestExample
38
39include $(SETTINGS)/stdtarget.mk
40
41$(CLASSFILES) : $(JAVAFILES)
42	-$(MKDIR) $(subst /,$(PS),$(@D))
43	$(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
44
45JavaStorageTestExample : $(CLASSFILES)
46	@echo --------------------------------------------------------------------------------
47	@echo Please use following command to execute the example!
48	@echo ------
49	@echo $(MAKE) StorageFunctionality.run
50	@echo --------------------------------------------------------------------------------
51
52%.run: $(OUT_COMP_CLASS)/%.class
53	$(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(basename $@)
54
55.PHONY: clean
56clean :
57	-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
58
59