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 SimpleBootstrap_java example. 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=SimpleBootstrap_java 33OUT_COMP_CLASS = $(OUT_CLASS)/$(COMPONENT_NAME) 34 35COMPONENT_JAR_NAME = $(COMPONENT_NAME).jar 36COMPONENT_JAR = $(OUT_CLASS)/$(COMPONENT_JAR_NAME) 37 38JAVAFILES = \ 39 SimpleBootstrap_java.java 40 41CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES)) 42 43SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\ 44 $(PATH_SEPARATOR)$(OUT_COMP_CLASS)) 45 46# Targets 47.PHONY: ALL 48ALL : \ 49 SimpleBootstrapJavaExample 50 51include $(SETTINGS)/stdtarget.mk 52 53$(CLASSFILES) : $(JAVAFILES) 54 -$(MKDIR) $(subst /,$(PS),$(@D)) 55 $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES) 56 57$(OUT_CLASS)/%.jar : manifest.mf $(CLASSFILES) 58 -$(MKDIR) $(subst /,$(PS),$(@D)) 59 $(SDK_JAR) cvfm $@ $< -C $(OUT_COMP_CLASS) . 60 $(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 61 62SimpleBootstrapJavaExample : $(COMPONENT_JAR) 63 @echo -------------------------------------------------------------------------------- 64 @echo Please use the following command to execute the example! 65 @echo - 66 @echo $(MAKE) SimpleBootstrap_java.run 67 @echo -------------------------------------------------------------------------------- 68 69# Setting the optional system property "com.sun.star.lib.loader.unopath" to the office 70# program path ensures that the conmfigured SDK office is used. If the system property 71# is not specified, the default office installation is used. 72%.run: $(COMPONENT_JAR) 73 $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $(COMPONENT_JAR) 74 75.PHONY: clean 76clean : 77 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS)) 78 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT_JAR))) 79