1*cdf0e10cSrcweir#************************************************************************* 2*cdf0e10cSrcweir# 3*cdf0e10cSrcweir# The Contents of this file are made available subject to the terms of 4*cdf0e10cSrcweir# the BSD license. 5*cdf0e10cSrcweir# 6*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates. 7*cdf0e10cSrcweir# All rights reserved. 8*cdf0e10cSrcweir# 9*cdf0e10cSrcweir# Redistribution and use in source and binary forms, with or without 10*cdf0e10cSrcweir# modification, are permitted provided that the following conditions 11*cdf0e10cSrcweir# are met: 12*cdf0e10cSrcweir# 1. Redistributions of source code must retain the above copyright 13*cdf0e10cSrcweir# notice, this list of conditions and the following disclaimer. 14*cdf0e10cSrcweir# 2. Redistributions in binary form must reproduce the above copyright 15*cdf0e10cSrcweir# notice, this list of conditions and the following disclaimer in the 16*cdf0e10cSrcweir# documentation and/or other materials provided with the distribution. 17*cdf0e10cSrcweir# 3. Neither the name of Sun Microsystems, Inc. nor the names of its 18*cdf0e10cSrcweir# contributors may be used to endorse or promote products derived 19*cdf0e10cSrcweir# from this software without specific prior written permission. 20*cdf0e10cSrcweir# 21*cdf0e10cSrcweir# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22*cdf0e10cSrcweir# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23*cdf0e10cSrcweir# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24*cdf0e10cSrcweir# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25*cdf0e10cSrcweir# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26*cdf0e10cSrcweir# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27*cdf0e10cSrcweir# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 28*cdf0e10cSrcweir# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 29*cdf0e10cSrcweir# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 30*cdf0e10cSrcweir# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 31*cdf0e10cSrcweir# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32*cdf0e10cSrcweir# 33*cdf0e10cSrcweir#************************************************************************** 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir# Builds the SpreadSheet examples of the Developers Guide. 36*cdf0e10cSrcweir 37*cdf0e10cSrcweirPRJ=../../.. 38*cdf0e10cSrcweirSETTINGS=$(PRJ)/settings 39*cdf0e10cSrcweir 40*cdf0e10cSrcweirinclude $(SETTINGS)/settings.mk 41*cdf0e10cSrcweirinclude $(SETTINGS)/std.mk 42*cdf0e10cSrcweirinclude $(SETTINGS)/dk.mk 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir# Define non-platform/compiler specific settings 45*cdf0e10cSrcweirSAMPLE_NAME=DevGuideSpreadsheetExamples 46*cdf0e10cSrcweirSAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME) 47*cdf0e10cSrcweirSAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME) 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir# Example add-in component 50*cdf0e10cSrcweirCOMP1_NAME=ExampleAddIn 51*cdf0e10cSrcweirCOMP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP1_NAME) 52*cdf0e10cSrcweirCOMP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP1_NAME) 53*cdf0e10cSrcweirCOMP1_RDB_NAME=$(COMP1_NAME).uno.rdb 54*cdf0e10cSrcweirCOMP1_RDB=$(COMP1_GEN_OUT)/$(COMP1_RDB_NAME) 55*cdf0e10cSrcweirCOMP1_PACKAGE=$(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT) 56*cdf0e10cSrcweirCOMP1_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)") 57*cdf0e10cSrcweirCOMP1_JAR_NAME=$(COMP1_NAME).uno.jar 58*cdf0e10cSrcweirCOMP1_JAR=$(SAMPLE_CLASS_OUT)/$(COMP1_JAR_NAME) 59*cdf0e10cSrcweirCOMP1_MANIFESTFILE=$(COMP1_GEN_OUT)/$(COMP1_NAME).uno.Manifest 60*cdf0e10cSrcweirCOMP1_UNOPKG_MANIFEST=$(COMP1_GEN_OUT)/$(COMP1_NAME)/META-INF/manifest.xml 61*cdf0e10cSrcweirCOMP1_REGISTERFLAG=$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag 62*cdf0e10cSrcweirCOMP1_COMPONENTS=$(COMP1_NAME).components 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir# Example DataPilot component 65*cdf0e10cSrcweirCOMP2_NAME=ExampleDataPilotSource 66*cdf0e10cSrcweirCOMP2_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP2_NAME) 67*cdf0e10cSrcweirCOMP2_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP2_NAME) 68*cdf0e10cSrcweirCOMP2_PACKAGE=$(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT) 69*cdf0e10cSrcweirCOMP2_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)") 70*cdf0e10cSrcweirCOMP2_JAR_NAME=$(COMP2_NAME).uno.jar 71*cdf0e10cSrcweirCOMP2_JAR=$(SAMPLE_CLASS_OUT)/$(COMP2_JAR_NAME) 72*cdf0e10cSrcweirCOMP2_MANIFESTFILE=$(COMP2_GEN_OUT)/$(COMP2_NAME).uno.Manifest 73*cdf0e10cSrcweirCOMP2_UNOPKG_MANIFEST=$(COMP2_GEN_OUT)/$(COMP2_NAME)/META-INF/manifest.xml 74*cdf0e10cSrcweirCOMP2_REGISTERFLAG=$(SAMPLE_GEN_OUT)/devguide_$(COMP2_NAME)_register_component.flag 75*cdf0e10cSrcweirCOMP2_COMPONENTS=$(COMP2_NAME).components 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir#REGISTERFLAG = $(OUT_MISC)$(PS)devguide_$(SAMPLE_NAME)_register_component.flag 78*cdf0e10cSrcweir 79*cdf0e10cSrcweirAPP1_NAME=GeneralTableSample 80*cdf0e10cSrcweirAPP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP1_NAME) 81*cdf0e10cSrcweirAPP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP1_NAME) 82*cdf0e10cSrcweirAPP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar 83*cdf0e10cSrcweir 84*cdf0e10cSrcweirAPP2_NAME=SpreadsheetSample 85*cdf0e10cSrcweirAPP2_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP2_NAME) 86*cdf0e10cSrcweirAPP2_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP2_NAME) 87*cdf0e10cSrcweirAPP2_JAR=$(SAMPLE_CLASS_OUT)/$(APP2_NAME).jar 88*cdf0e10cSrcweir 89*cdf0e10cSrcweirAPP3_NAME=ViewSample 90*cdf0e10cSrcweirAPP3_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP3_NAME) 91*cdf0e10cSrcweirAPP3_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP3_NAME) 92*cdf0e10cSrcweirAPP3_JAR=$(SAMPLE_CLASS_OUT)/$(APP3_NAME).jar 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir 95*cdf0e10cSrcweirCOMP1_IDLFILES = XExampleAddIn.idl 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir# normally the idl file should be stored in a directory tree fitting the 98*cdf0e10cSrcweir# module structure, for the example we know the module structure 99*cdf0e10cSrcweirPACKAGE = org/openoffice/sheet/addin 100*cdf0e10cSrcweir 101*cdf0e10cSrcweirCOMP1_JAVAFILES = \ 102*cdf0e10cSrcweir ExampleAddIn.java 103*cdf0e10cSrcweir 104*cdf0e10cSrcweirCOMP2_JAVAFILES = \ 105*cdf0e10cSrcweir ExampleDataPilotSource.java 106*cdf0e10cSrcweir 107*cdf0e10cSrcweirAPP_JAVAFILES = \ 108*cdf0e10cSrcweir SpreadsheetDocHelper.java 109*cdf0e10cSrcweir 110*cdf0e10cSrcweirAPP_CLASSFILES = $(patsubst %.java,$(SAMPLE_CLASS_OUT)/%.class,$(APP_JAVAFILES)) 111*cdf0e10cSrcweirAPP_CLASSNAMES = $(patsubst %.java,%.class,$(APP_JAVAFILES)) 112*cdf0e10cSrcweir 113*cdf0e10cSrcweirCOMP1_GENCLASSFILES = $(patsubst %.idl,$(COMP1_CLASS_OUT)/$(PACKAGE)/%.class,$(COMP1_IDLFILES)) 114*cdf0e10cSrcweirCOMP1_GENTYPELIST = $(subst /,.,$(patsubst %.idl,-T$(PACKAGE)/% ,$(COMP1_IDLFILES))) 115*cdf0e10cSrcweirCOMP1_GENURDFILES = $(patsubst %.idl,$(COMP1_GEN_OUT)/%.urd,$(COMP1_IDLFILES)) 116*cdf0e10cSrcweir 117*cdf0e10cSrcweirCOMP1_CLASSFILES = $(patsubst %.java,$(COMP1_CLASS_OUT)/%.class,$(COMP1_JAVAFILES)) 118*cdf0e10cSrcweir 119*cdf0e10cSrcweirCOMP2_CLASSFILES = $(patsubst %.java,$(COMP2_CLASS_OUT)/%.class,$(COMP2_JAVAFILES)) 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir 122*cdf0e10cSrcweirSDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\ 123*cdf0e10cSrcweir $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT)\ 124*cdf0e10cSrcweir $(PATH_SEPARATOR)$(COMP1_CLASS_OUT)\ 125*cdf0e10cSrcweir $(PATH_SEPARATOR)$(COMP2_CLASS_OUT)\ 126*cdf0e10cSrcweir $(PATH_SEPARATOR)$(APP1_CLASS_OUT)\ 127*cdf0e10cSrcweir $(PATH_SEPARATOR)$(APP2_CLASS_OUT)\ 128*cdf0e10cSrcweir $(PATH_SEPARATOR)$(APP3_CLASS_OUT)) 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir# Targets 132*cdf0e10cSrcweir.PHONY: ALL 133*cdf0e10cSrcweirALL : $(SAMPLE_NAME) 134*cdf0e10cSrcweir 135*cdf0e10cSrcweirinclude $(SETTINGS)/stdtarget.mk 136*cdf0e10cSrcweir 137*cdf0e10cSrcweir$(SAMPLE_GEN_OUT)/%.Manifest : 138*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 139*cdf0e10cSrcweir @echo UNO-Type-Path: $(basename $(notdir $*)).uno.jar> $@ 140*cdf0e10cSrcweir @echo RegistrationClassName: $(basename $(basename $(@F)))>> $@ 141*cdf0e10cSrcweir 142*cdf0e10cSrcweir# IDLs only for component 1 relevant 143*cdf0e10cSrcweir$(COMP1_GEN_OUT)/%.urd : %.idl 144*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 145*cdf0e10cSrcweir $(IDLC) -I. -I$(IDL_DIR) -O$(COMP1_GEN_OUT) $^ 146*cdf0e10cSrcweir 147*cdf0e10cSrcweir$(COMP1_RDB) : $(COMP1_GENURDFILES) 148*cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 149*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 150*cdf0e10cSrcweir $(REGMERGE) $@ /UCR $< 151*cdf0e10cSrcweir 152*cdf0e10cSrcweir$(COMP1_CLASS_OUT)/$(PACKAGE)/%.class : $(COMP1_RDB) 153*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 154*cdf0e10cSrcweir $(JAVAMAKER) -BUCR -nD $(COMP1_GENTYPELIST) -O$(COMP1_CLASS_OUT) $(COMP1_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES) 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir$(COMP1_CLASSFILES) : $(COMP1_JAVAFILES) $(COMP1_GENCLASSFILES) 157*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 158*cdf0e10cSrcweir $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP1_CLASS_OUT) $(COMP1_JAVAFILES) 159*cdf0e10cSrcweir 160*cdf0e10cSrcweir$(COMP2_CLASSFILES) : $(COMP2_JAVAFILES) 161*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 162*cdf0e10cSrcweir $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP2_CLASS_OUT) $^ 163*cdf0e10cSrcweir 164*cdf0e10cSrcweir$(COMP1_JAR) : $(COMP1_MANIFESTFILE) $(COMP1_CLASSFILES) 165*cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 166*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 167*cdf0e10cSrcweir $(SDK_JAR) cvfm $@ $< -C $(COMP1_CLASS_OUT) . 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir$(COMP2_JAR) : $(COMP2_MANIFESTFILE) $(COMP2_CLASSFILES) 170*cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 171*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 172*cdf0e10cSrcweir $(SDK_JAR) cvfm $@ $< -C $(COMP2_CLASS_OUT) . 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir$(COMP1_UNOPKG_MANIFEST) : 175*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 176*cdf0e10cSrcweir @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@ 177*cdf0e10cSrcweir @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@ 178*cdf0e10cSrcweir @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@ 179*cdf0e10cSrcweir @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@ 180*cdf0e10cSrcweir @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(COMP1_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@ 181*cdf0e10cSrcweir @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@ 182*cdf0e10cSrcweir @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP1_COMPONENTS)$(QM)"/$(CSEP)>> $@ 183*cdf0e10cSrcweir @echo $(OSEP)/manifest:manifest$(CSEP) >> $@ 184*cdf0e10cSrcweir 185*cdf0e10cSrcweir$(COMP2_UNOPKG_MANIFEST) : 186*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 187*cdf0e10cSrcweir @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@ 188*cdf0e10cSrcweir @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@ 189*cdf0e10cSrcweir @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@ 190*cdf0e10cSrcweir @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@ 191*cdf0e10cSrcweir @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP2_COMPONENTS)$(QM)"/$(CSEP)>> $@ 192*cdf0e10cSrcweir @echo $(OSEP)/manifest:manifest$(CSEP) >> $@ 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir$(COMP1_PACKAGE) : $(COMP1_RDB) $(COMP1_JAR) $(COMP1_UNOPKG_MANIFEST) $(COMP1_COMPONENTS) 195*cdf0e10cSrcweir echo "####" $(@) 196*cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 197*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 198*cdf0e10cSrcweir $(SDK_ZIP) $@ $(COMP1_COMPONENTS) 199*cdf0e10cSrcweir cd $(subst /,$(PS),$(COMP1_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) $(<F) 200*cdf0e10cSrcweir cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP1_JAR_NAME) 201*cdf0e10cSrcweir cd $(subst /,$(PS),$(COMP1_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../../bin/$(@F) META-INF/manifest.xml 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir$(COMP2_PACKAGE) : $(COMP2_JAR) $(COMP2_UNOPKG_MANIFEST) $(COMP2_COMPONENTS) 204*cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 205*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 206*cdf0e10cSrcweir $(SDK_ZIP) $@ $(COMP2_COMPONENTS) 207*cdf0e10cSrcweir cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F) 208*cdf0e10cSrcweir cd $(subst /,$(PS),$(COMP2_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../../bin/$(@F) META-INF/manifest.xml 209*cdf0e10cSrcweir 210*cdf0e10cSrcweir$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag : $(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT) 211*cdf0e10cSrcweirifeq "$(SDK_AUTO_DEPLOYMENT)" "YES" 212*cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 213*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 214*cdf0e10cSrcweir $(DEPLOYTOOL) $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)") 215*cdf0e10cSrcweir @echo flagged > $(subst /,$(PS),$@) 216*cdf0e10cSrcweirelse 217*cdf0e10cSrcweir @echo -------------------------------------------------------------------------------- 218*cdf0e10cSrcweir @echo If you want to install your component automatically, please set the environment 219*cdf0e10cSrcweir @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only 220*cdf0e10cSrcweir @echo possible if no office instance is running. 221*cdf0e10cSrcweir @echo -------------------------------------------------------------------------------- 222*cdf0e10cSrcweirendif 223*cdf0e10cSrcweir 224*cdf0e10cSrcweir$(SAMPLE_GEN_OUT)/devguide_$(COMP2_NAME)_register_component.flag : $(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT) 225*cdf0e10cSrcweirifeq "$(SDK_AUTO_DEPLOYMENT)" "YES" 226*cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 227*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 228*cdf0e10cSrcweir $(DEPLOYTOOL) $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)") 229*cdf0e10cSrcweir @echo flagged > $(subst /,$(PS),$@) 230*cdf0e10cSrcweirelse 231*cdf0e10cSrcweir @echo -------------------------------------------------------------------------------- 232*cdf0e10cSrcweir @echo If you want to install your component automatically, please set the environment 233*cdf0e10cSrcweir @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only 234*cdf0e10cSrcweir @echo possible if no office instance is running. 235*cdf0e10cSrcweir @echo -------------------------------------------------------------------------------- 236*cdf0e10cSrcweirendif 237*cdf0e10cSrcweir 238*cdf0e10cSrcweir$(APP_CLASSFILES) : $(APP_JAVAFILES) 239*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 240*cdf0e10cSrcweir $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $(APP_JAVAFILES) 241*cdf0e10cSrcweir 242*cdf0e10cSrcweir$(APP1_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES) 243*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 244*cdf0e10cSrcweir $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP1_CLASS_OUT) $< 245*cdf0e10cSrcweir 246*cdf0e10cSrcweir$(APP2_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES) 247*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 248*cdf0e10cSrcweir $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP2_CLASS_OUT) $< 249*cdf0e10cSrcweir 250*cdf0e10cSrcweir$(APP3_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES) 251*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 252*cdf0e10cSrcweir $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP3_CLASS_OUT) $< 253*cdf0e10cSrcweir 254*cdf0e10cSrcweir$(SAMPLE_GEN_OUT)/%.mf : 255*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 256*cdf0e10cSrcweir @echo Main-Class: com.sun.star.lib.loader.Loader> $@ 257*cdf0e10cSrcweir $(ECHOLINE)>> $@ 258*cdf0e10cSrcweir @echo Name: com/sun/star/lib/loader/Loader.class>> $@ 259*cdf0e10cSrcweir @echo Application-Class: $(basename $(@F))>> $@ 260*cdf0e10cSrcweir 261*cdf0e10cSrcweir$(APP1_JAR) : $(APP1_GEN_OUT)/$(APP1_NAME).mf $(APP1_CLASS_OUT)/$(APP1_NAME).class $(APP_CLASSFILES) 262*cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 263*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 264*cdf0e10cSrcweir +$(SDK_JAR) cvfm $@ $< -C $(APP1_CLASS_OUT) . 265*cdf0e10cSrcweir +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 266*cdf0e10cSrcweir +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES) 267*cdf0e10cSrcweir 268*cdf0e10cSrcweir$(APP2_JAR) : $(APP2_GEN_OUT)/$(APP2_NAME).mf $(APP2_CLASS_OUT)/$(APP2_NAME).class $(APP_CLASSFILES) 269*cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 270*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 271*cdf0e10cSrcweir +$(SDK_JAR) cvfm $@ $< -C $(APP2_CLASS_OUT) . 272*cdf0e10cSrcweir +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 273*cdf0e10cSrcweir +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES) 274*cdf0e10cSrcweir 275*cdf0e10cSrcweir$(APP3_JAR) : $(APP3_GEN_OUT)/$(APP3_NAME).mf $(APP3_CLASS_OUT)/$(APP3_NAME).class $(APP_CLASSFILES) 276*cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 277*cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 278*cdf0e10cSrcweir +$(SDK_JAR) cvfm $@ $< -C $(APP3_CLASS_OUT) . 279*cdf0e10cSrcweir +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 280*cdf0e10cSrcweir +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES) 281*cdf0e10cSrcweir 282*cdf0e10cSrcweir$(SAMPLE_NAME) : $(COMP1_REGISTERFLAG) $(COMP2_REGISTERFLAG) $(APP1_JAR) $(APP2_JAR) $(APP3_JAR) 283*cdf0e10cSrcweir @echo -------------------------------------------------------------------------------- 284*cdf0e10cSrcweir @echo Please use one of the following commands to execute the examples! 285*cdf0e10cSrcweir @echo - 286*cdf0e10cSrcweir @echo $(MAKE) $(APP1_NAME).run 287*cdf0e10cSrcweir @echo $(MAKE) $(APP2_NAME).run 288*cdf0e10cSrcweir @echo $(MAKE) $(APP3_NAME).run 289*cdf0e10cSrcweir @echo -------- 290*cdf0e10cSrcweir @echo The "$(QM)$(COMP1_NAME)$(QM)" and "$(QM)$(COMP2_NAME)$(QM)" component are installed if 291*cdf0e10cSrcweir @echo SDK_AUTO_DEPLOYMENT = YES. You can use this components inside your office 292*cdf0e10cSrcweir @echo installation, see the example descriptions. You can also load the "$(QM)ExampleAddIn.ods$(QM)" 293*cdf0e10cSrcweir @echo document to see how the add-in functions can be used. For more details about the 294*cdf0e10cSrcweir @echo "$(QM)$(COMP2_NAME)$(QM)" component see the "$(QM)DataPilotReadme.txt"$(QM). 295*cdf0e10cSrcweir @echo - 296*cdf0e10cSrcweir @echo $(MAKE) ExampleAddIn.ods.load 297*cdf0e10cSrcweir @echo -------------------------------------------------------------------------------- 298*cdf0e10cSrcweir 299*cdf0e10cSrcweir%.run: $(SAMPLE_CLASS_OUT)/%.jar 300*cdf0e10cSrcweir $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< 301*cdf0e10cSrcweir 302*cdf0e10cSrcweirExampleAddIn.ods.load : $(COMP1_REGISTERFLAG) 303*cdf0e10cSrcweir "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@) 304*cdf0e10cSrcweir 305*cdf0e10cSrcweir.PHONY: clean 306*cdf0e10cSrcweirclean : 307*cdf0e10cSrcweir -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) 308*cdf0e10cSrcweir -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT)) 309*cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP1_PACKAGE_URL))) 310*cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP2_PACKAGE_URL))) 311