summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/DevelopersGuide/Components/CppComponent/Makefile')
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/Makefile44
1 files changed, 31 insertions, 13 deletions
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/Makefile b/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
index 0a4e7eee4cae..b89d58bd6211 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
@@ -49,7 +49,7 @@ SAMPLE_SLO_OUT=$(OUT_SLO)/$(SAMPLE_NAME)
SAMPLE_OBJ_OUT=$(OUT_OBJ)/$(SAMPLE_NAME)
COMP_NAME=CppComponent
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
+COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
APP1_NAME= TestCppComponent
APP1_BINARY= $(OUT_BIN)/$(APP1_NAME)$(EXE_EXT)
@@ -59,7 +59,8 @@ COMP_RDB = $(SAMPLE_GEN_OUT)/$(COMP_RDB_NAME)
COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
COMP_UNOPKG_MANIFEST = $(SAMPLE_GEN_OUT)/$(COMP_NAME)/META-INF/manifest.xml
-COMP_MAPFILE = $(SAMPLE_GEN_OUT)/$(COMP_NAME).uno.map
+#COMP_MAPFILE = $(SAMPLE_GEN_OUT)/$(COMP_NAME).uno.map
+COMP_COMPONENTS = $(SAMPLE_GEN_OUT)/$(COMP_NAME).components
COMP_REGISTERFLAG = $(SAMPLE_GEN_OUT)/devguide_$(COMP_NAME)_register_component.flag
COMP_TYPEFLAG = $(SAMPLE_GEN_OUT)/devguide_$(COMP_NAME)_types.flag
@@ -103,12 +104,12 @@ $(SAMPLE_SLO_OUT)/%.$(OBJ_EXT) : %.cxx $(COMP_TYPEFLAG)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(SAMPLE_INC_OUT) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-$(COMP_MAPFILE) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
-ifeq "$(OS)" "MACOSX"
- nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
-endif
+#$(COMP_MAPFILE) : $(SLOFILES)
+# -$(MKDIR) $(subst /,$(PS),$(@D))
+# cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
+#ifeq "$(OS)" "MACOSX"
+# nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
+#endif
ifeq "$(OS)" "WIN"
$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
@@ -119,7 +120,8 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
$(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+#$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
$(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
@@ -136,16 +138,31 @@ $(SAMPLE_GEN_OUT)/%/manifest.xml :
@echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
@echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
@echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(SAMPLE_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=native;platform=$(UNOPKG_PLATFORM)$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(SAMPLE_GEN_OUT)/,,$(UNOPKG_PLATFORM)/$(@D))).uno.$(SHAREDLIB_EXT)$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components;platform=$(UNOPKG_PLATFORM)$(QM)">> $@
+ @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) $(COMP_RDB) $(COMP_UNOPKG_MANIFEST)
+$(COMP_COMPONENTS) :
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
+ @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(UNOPKG_PLATFORM)/$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)my_module.my_sc_implementation.MyService1$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)my_module.MyService1$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)my_module.my_sc_implementation.MyService2$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)my_module.MyService2$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
+ @echo $(OSEP)/components$(CSEP) >> $@
+
+$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) $(COMP_RDB) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
-$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT)/$(UNOPKG_PLATFORM))
$(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(SAMPLE_GEN_OUT)/$(UNOPKG_PLATFORM))
- cd $(subst /,$(PS),$(SAMPLE_GEN_OUT)) && $(SDK_ZIP) ../../bin/$(@F) $(COMP_RDB_NAME) $(UNOPKG_PLATFORM)/$(<F)
+ cd $(subst /,$(PS),$(SAMPLE_GEN_OUT)) && $(SDK_ZIP) ../../bin/$(@F) $(COMP_NAME).components
+ cd $(subst /,$(PS),$(SAMPLE_GEN_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_RDB_NAME) $(UNOPKG_PLATFORM)/$(<F)
cd $(subst /,$(PS),$(SAMPLE_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
@@ -216,5 +233,6 @@ clean :
-$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
-$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_SLO_OUT))
-$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_OBJ_OUT))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_COMPONENTS)))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/$(COMP_NAME)*))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/*$(APP1_NAME)*))