crashtesting: assert on reimport of docx export of ooo102874-2.doc
[LibreOffice.git] / odk / examples / DevelopersGuide / Drawing / Makefile
blobe5bbf1bf187cd9f840cc37f56499a3b074d9e751
1 #*************************************************************************
3 # The Contents of this file are made available subject to the terms of
4 # the BSD license.
5 #
6 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # All rights reserved.
9 # Redistribution and use in source and binary forms, with or without
10 # modification, are permitted provided that the following conditions
11 # are met:
12 # 1. Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 # 2. Redistributions in binary form must reproduce the above copyright
15 # notice, this list of conditions and the following disclaimer in the
16 # documentation and/or other materials provided with the distribution.
17 # 3. Neither the name of Sun Microsystems, Inc. nor the names of its
18 # contributors may be used to endorse or promote products derived
19 # from this software without specific prior written permission.
21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28 # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
30 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
31 # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 #**************************************************************************
35 # Builds the Drawing examples of the Developers Guide.
37 PRJ=../../..
38 SETTINGS=$(PRJ)/settings
40 include $(SETTINGS)/settings.mk
41 include $(SETTINGS)/std.mk
43 # Define non-platform/compiler specific settings
44 SAMPLE_NAME=DrawingExamples
45 SAMPLE_CLASS_OUT = $(OUT_CLASS)/$(SAMPLE_NAME)
46 SAMPLE_GEN_OUT = $(OUT_MISC)/$(SAMPLE_NAME)
48 APP1_NAME=ChangeOrderDemo
49 APP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar
50 APP2_NAME=ControlAndSelectDemo
51 APP2_JAR=$(SAMPLE_CLASS_OUT)/$(APP2_NAME).jar
52 APP3_NAME=CustomShowDemo
53 APP3_JAR=$(SAMPLE_CLASS_OUT)/$(APP3_NAME).jar
54 APP4_NAME=DrawingDemo
55 APP4_JAR=$(SAMPLE_CLASS_OUT)/$(APP4_NAME).jar
56 APP5_NAME=DrawViewDemo
57 APP5_JAR=$(SAMPLE_CLASS_OUT)/$(APP5_NAME).jar
58 APP6_NAME=FillAndLineStyleDemo
59 APP6_JAR=$(SAMPLE_CLASS_OUT)/$(APP6_NAME).jar
60 APP7_NAME=GluePointDemo
61 APP7_JAR=$(SAMPLE_CLASS_OUT)/$(APP7_NAME).jar
62 APP8_NAME=GraphicExportDemo
63 APP8_JAR=$(SAMPLE_CLASS_OUT)/$(APP8_NAME).jar
64 APP9_NAME=LayerDemo
65 APP9_JAR=$(SAMPLE_CLASS_OUT)/$(APP9_NAME).jar
66 APP10_NAME=ObjectTransformationDemo
67 APP10_JAR=$(SAMPLE_CLASS_OUT)/$(APP10_NAME).jar
68 APP11_NAME=Organigram
69 APP11_JAR=$(SAMPLE_CLASS_OUT)/$(APP11_NAME).jar
70 APP12_NAME=PresentationDemo
71 APP12_JAR=$(SAMPLE_CLASS_OUT)/$(APP12_NAME).jar
72 APP13_NAME=StyleDemo
73 APP13_JAR=$(SAMPLE_CLASS_OUT)/$(APP13_NAME).jar
74 APP14_NAME=TextDemo
75 APP14_JAR=$(SAMPLE_CLASS_OUT)/$(APP14_NAME).jar
77 APP_JAVAFILES = \
78 Helper.java \
79 PageHelper.java \
80 ShapeHelper.java
82 APP_CLASSFILES = $(patsubst %.java,$(SAMPLE_CLASS_OUT)/%.class,$(APP_JAVAFILES))
83 APP_CLASSNAMES = $(patsubst %.java,%.class,$(APP_JAVAFILES))
85 SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
86 $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT))
89 # Targets
90 .PHONY: ALL
91 ALL : \
92 DrawingExamples
94 include $(SETTINGS)/stdtarget.mk
96 $(APP_CLASSFILES) : $(APP_JAVAFILES)
97 -$(MKDIR) $(subst /,$(PS),$(@D))
98 $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $(APP_JAVAFILES)
100 $(SAMPLE_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES)
101 -$(MKDIR) $(subst /,$(PS),$(@D))
102 $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $<
104 $(SAMPLE_CLASS_OUT)/%.mf :
105 -$(MKDIR) $(subst /,$(PS),$(@D))
106 @echo Main-Class: com.sun.star.lib.loader.Loader> $@
107 $(ECHOLINE)>> $@
108 @echo Name: com/sun/star/lib/loader/Loader.class>> $@
109 @echo Application-Class: $*>> $@
111 $(SAMPLE_CLASS_OUT)/%.jar : $(SAMPLE_CLASS_OUT)/%.mf $(SAMPLE_CLASS_OUT)/%.class $(APP_CLASSFILES)
112 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
113 -$(MKDIR) $(subst /,$(PS),$(@D))
114 +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class $(APP_CLASSNAMES)
115 +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
117 $(APP1_JAR) : $(SAMPLE_CLASS_OUT)/$(APP1_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP1_NAME).class
118 $(APP2_JAR) : $(SAMPLE_CLASS_OUT)/$(APP2_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP2_NAME).class
119 $(APP3_JAR) : $(SAMPLE_CLASS_OUT)/$(APP3_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP3_NAME).class
120 $(APP4_JAR) : $(SAMPLE_CLASS_OUT)/$(APP4_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP4_NAME).class
121 $(APP5_JAR) : $(SAMPLE_CLASS_OUT)/$(APP5_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP5_NAME).class
122 $(APP6_JAR) : $(SAMPLE_CLASS_OUT)/$(APP6_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP6_NAME).class
123 $(APP7_JAR) : $(SAMPLE_CLASS_OUT)/$(APP7_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP7_NAME).class
124 $(APP8_JAR) : $(SAMPLE_CLASS_OUT)/$(APP8_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP8_NAME).class
125 $(APP9_JAR) : $(SAMPLE_CLASS_OUT)/$(APP9_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP9_NAME).class
126 $(APP10_JAR) : $(SAMPLE_CLASS_OUT)/$(APP10_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP10_NAME).class
127 $(APP11_JAR) : $(SAMPLE_CLASS_OUT)/$(APP11_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP11_NAME).class
128 $(APP12_JAR) : $(SAMPLE_CLASS_OUT)/$(APP12_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP12_NAME).class
129 $(APP13_JAR) : $(SAMPLE_CLASS_OUT)/$(APP13_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP13_NAME).class
130 $(APP14_JAR) : $(SAMPLE_CLASS_OUT)/$(APP14_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP14_NAME).class
132 DrawingExamples : $(APP1_JAR) $(APP2_JAR) $(APP3_JAR) $(APP4_JAR) $(APP5_JAR) $(APP6_JAR) $(APP7_JAR) $(APP8_JAR) $(APP9_JAR) $(APP10_JAR) $(APP11_JAR) $(APP12_JAR) $(APP13_JAR) $(APP14_JAR)
133 @echo --------------------------------------------------------------------------------
134 @echo Please use one of the following commands to execute the examples!
135 @echo -
136 @echo $(MAKE) $(APP1_NAME).run
137 @echo $(MAKE) $(APP2_NAME).run
138 @echo $(MAKE) $(APP3_NAME).run
139 @echo $(MAKE) $(APP4_NAME).run
140 @echo $(MAKE) $(APP5_NAME).run
141 @echo $(MAKE) $(APP6_NAME).run
142 @echo $(MAKE) $(APP7_NAME).run
143 @echo $(MAKE) $(APP8_NAME).run
144 @echo $(MAKE) $(APP9_NAME).run
145 @echo $(MAKE) $(APP10_NAME).run
146 @echo $(MAKE) $(APP11_NAME).run
147 @echo $(MAKE) $(APP12_NAME).run
148 @echo $(MAKE) $(APP13_NAME).run
149 @echo $(MAKE) $(APP14_NAME).run
150 @echo --------
151 @echo The $(APP5_NAME) and the $(APP8_NAME) needs parameters. Please use the
152 @echo following command to start the demo if you do not want the default parameters
153 @echo specified in the this makefile:
154 @echo --- $(APP5_NAME) ---
155 @echo java -Dcom.sun.star.lib.loader.unopath="$(QM)$(OFFICE_PROGRAM_PATH)$(QM)" -jar $(APP5_NAME).jar "$(QM)SourceUrl$(QM)"
156 @echo --- $(APP8_NAME) ---
157 @echo java -Dcom.sun.star.lib.loader.unopath="$(QM)$(OFFICE_PROGRAM_PATH)$(QM)" -jar $(APP8_NAME).jar "$(QM)SourceUrl$(QM)" "$(QM)DestinationUrl$(QM)" "$(QM)index$(QM)"
158 @echo --------------------------------------------------------------------------------
160 %.run: $(SAMPLE_CLASS_OUT)/%.jar
161 $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
163 $(APP5_NAME).run: $(APP5_JAR)
164 $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< SimplePresentation.odp
166 $(APP8_NAME).run: $(APP8_JAR)
167 -$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT)/export)
168 $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< SimplePresentation.odp "$(SAMPLE_GEN_OUT)/export/MyTestExport.gif" 2
171 .PHONY: clean
172 clean :
173 -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
174 -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))