summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/FirstSteps
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2005-01-31 15:27:04 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2005-01-31 15:27:04 +0000
commit585efb04bd68915960669274333e22928b3e6ef8 (patch)
treefb7c284689069b52fa152ef7d11ee07f94e275e5 /odk/examples/DevelopersGuide/FirstSteps
parentdc1efa908f78a7c1e040c629d70e71784b138462 (diff)
INTEGRATION: CWS sdksample (1.4.4); FILE MERGED
2005/01/28 14:15:24 jsc 1.4.4.7: #i29308# prepare path for del command (windows only) 2004/10/29 07:33:47 jsc 1.4.4.6: #i29308# cleanup 2004/08/17 14:18:27 jsc 1.4.4.5: #i29308# change FirstConnection to FirstUnoContact 2004/07/30 14:30:04 jsc 1.4.4.4: #i29308# use quotes for unopath option 2004/07/30 08:36:26 jsc 1.4.4.3: #i29308# adjust ECHOLINE for windows 2004/07/29 12:22:46 jsc 1.4.4.2: #i29308# insert ECHOLINE macro to dump an empty line in manifest files 2004/06/10 13:24:42 jsc 1.4.4.1: #i29308# use of new UNO bootstrap feature
Diffstat (limited to 'odk/examples/DevelopersGuide/FirstSteps')
-rw-r--r--odk/examples/DevelopersGuide/FirstSteps/Makefile59
1 files changed, 38 insertions, 21 deletions
diff --git a/odk/examples/DevelopersGuide/FirstSteps/Makefile b/odk/examples/DevelopersGuide/FirstSteps/Makefile
index f9d97ea69e45..e519257c725b 100644
--- a/odk/examples/DevelopersGuide/FirstSteps/Makefile
+++ b/odk/examples/DevelopersGuide/FirstSteps/Makefile
@@ -2,9 +2,9 @@
#
# $RCSfile: Makefile,v $
#
-# $Revision: 1.4 $
+# $Revision: 1.5 $
#
-# last change: $Author: rt $ $Date: 2004-05-18 13:23:39 $
+# last change: $Author: rt $ $Date: 2005-01-31 16:27:04 $
#
# The Contents of this file are made available subject to the terms of
# the BSD license.
@@ -48,43 +48,60 @@ include $(SETTINGS)/std.mk
include $(SETTINGS)/dk.mk
# Define non-platform/compiler specific settings
-COMPONENT_NAME=FirstStepsExamples
-OUT_COMP_CLASS = $(OUT_CLASS)/$(COMPONENT_NAME)
+EXAMPLE_NAME=FirstStepsExamples
+OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-JAVAFILES = \
- FirstConnection.java \
- FirstLoadComponent.java \
- HelloTextTableShape.java
-
-CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
+APP1_NAME=FirstUnoContact
+APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
+APP2_NAME=FirstLoadComponent
+APP2_JAR=$(OUT_APP_CLASS)/$(APP2_NAME).jar
+APP3_NAME=HelloTextTableShape
+APP3_JAR=$(OUT_APP_CLASS)/$(APP3_NAME).jar
SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
+ $(PATH_SEPARATOR)$(OUT_APP_CLASS))
# Targets
.PHONY: ALL
ALL : \
- FirstStepsExamples
+ $(EXAMPLE_NAME)
include $(SETTINGS)/stdtarget.mk
-$(CLASSFILES) : $(JAVAFILES)
+$(OUT_APP_CLASS)/%.class : %.java
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
+
+$(OUT_APP_CLASS)/%.mf :
-$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
+ @echo Main-Class: com.sun.star.lib.loader.Loader> $@
+ $(ECHOLINE)>> $@
+ @echo Name: com/sun/star/lib/loader/Loader.class>> $@
+ @echo Application-Class: $*>> $@
+
+$(OUT_APP_CLASS)/%.jar : $(OUT_APP_CLASS)/%.mf $(OUT_APP_CLASS)/%.class
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class
+ +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
+
+$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(OUT_APP_CLASS)/$(APP1_NAME).class
+$(APP2_JAR) : $(OUT_APP_CLASS)/$(APP2_NAME).mf $(OUT_APP_CLASS)/$(APP2_NAME).class
+$(APP3_JAR) : $(OUT_APP_CLASS)/$(APP3_NAME).mf $(OUT_APP_CLASS)/$(APP3_NAME).class
-FirstStepsExamples : $(CLASSFILES)
+$(EXAMPLE_NAME) : $(APP1_JAR) $(APP2_JAR) $(APP3_JAR)
@echo --------------------------------------------------------------------------------
@echo Please use one of the following commands to execute the examples!
@echo -
- @echo make FirstConnection.run
- @echo make FirstLoadComponent.run
- @echo make HelloTextTableShape.run
+ @echo make $(APP1_NAME).run
+ @echo make $(APP2_NAME).run
+ @echo make $(APP3_NAME).run
@echo --------------------------------------------------------------------------------
-%.run: $(OUT_COMP_CLASS)/%.class
- $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(basename $@)
+%.run: $(OUT_APP_CLASS)/%.jar
+ $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
.PHONY: clean
clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
+ -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))