Makefile (4847a43b) Makefile (bc3a3bfc)
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

--- 28 unchanged lines hidden (view full) ---

37COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
38COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
39COMP_UNOPKG_MANIFEST = $(OUT_COMP_GEN)/$(COMP_NAME)/META-INF/manifest.xml
40COMP_MAPFILE = $(OUT_COMP_GEN)/$(COMP_NAME).uno.map
41COMP_COMPONENTS = $(OUT_COMP_GEN)/$(COMP_NAME).components
42COMP_TYPEFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_types.flag
43
44# Allow deploying the extension when running it
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

--- 28 unchanged lines hidden (view full) ---

37COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
38COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
39COMP_UNOPKG_MANIFEST = $(OUT_COMP_GEN)/$(COMP_NAME)/META-INF/manifest.xml
40COMP_MAPFILE = $(OUT_COMP_GEN)/$(COMP_NAME).uno.map
41COMP_COMPONENTS = $(OUT_COMP_GEN)/$(COMP_NAME).components
42COMP_TYPEFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_types.flag
43
44# Allow deploying the extension when running it
45
46OUT_COMP_DEPLOY=$(OUT_DEPLOY)/$(COMP_NAME)
47OUT_DEPLOY_DIR=$(subst /,$(PS),$(OUT_COMP_DEPLOY))
48OUT_DEPLOY_URL=$(URLPREFIX)$(OUT_COMP_DEPLOY)
49ENV_USER_INSTALL=-env:"UserInstallation=$(OUT_DEPLOY_URL)"
50OFFICE_START_OPTIONS=-nologo -nofirststartwizard -norestore -writer
51OXT_DEPLOYEDFLAG=$(OUT_MISC)/cpp_$(COMP_NAME)_deployed_oxt.flag
52
53CXXFILES = \

--- 13 unchanged lines hidden (view full) ---

67
68$(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
69 -$(MKDIR) $(subst /,$(PS),$(@D))
70 $(CC) $(CC_FLAGS) $(STL_INCLUDES) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
71
72
73#$(COMP_MAPFILE) : $(SLOFILES)
74# -$(MKDIR) $(subst /,$(PS),$(@D))
45OUT_COMP_DEPLOY=$(OUT_DEPLOY)/$(COMP_NAME)
46OUT_DEPLOY_DIR=$(subst /,$(PS),$(OUT_COMP_DEPLOY))
47OUT_DEPLOY_URL=$(URLPREFIX)$(OUT_COMP_DEPLOY)
48ENV_USER_INSTALL=-env:"UserInstallation=$(OUT_DEPLOY_URL)"
49OFFICE_START_OPTIONS=-nologo -nofirststartwizard -norestore -writer
50OXT_DEPLOYEDFLAG=$(OUT_MISC)/cpp_$(COMP_NAME)_deployed_oxt.flag
51
52CXXFILES = \

--- 13 unchanged lines hidden (view full) ---

66
67$(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
68 -$(MKDIR) $(subst /,$(PS),$(@D))
69 $(CC) $(CC_FLAGS) $(STL_INCLUDES) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
70
71
72#$(COMP_MAPFILE) : $(SLOFILES)
73# -$(MKDIR) $(subst /,$(PS),$(@D))
75# cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
74# cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
76#ifeq "$(OS)" "MACOSX"
77# nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
78#endif
79
80ifeq "$(OS)" "WIN"
81$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
82 -$(MKDIR) $(subst /,$(PS),$(@D))
83 -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
84 $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
85 /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
86 $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
87 $(LINK_MANIFEST)
88else
89#$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
90$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
91 -$(MKDIR) $(subst /,$(PS),$(@D))
92 $(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
93 $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
94ifeq "$(OS)" "MACOSX"
75#ifeq "$(OS)" "MACOSX"
76# nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
77#endif
78
79ifeq "$(OS)" "WIN"
80$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
81 -$(MKDIR) $(subst /,$(PS),$(@D))
82 -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
83 $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
84 /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
85 $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
86 $(LINK_MANIFEST)
87else
88#$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
89$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
90 -$(MKDIR) $(subst /,$(PS),$(@D))
91 $(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
92 $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
93ifeq "$(OS)" "MACOSX"
95 $(INSTALL_NAME_URELIBS) $@
94 $(INSTALL_NAME_URELIBS) $@
96endif
97endif
98
99# rule for component package manifest
100$(OUT_COMP_GEN)/%/manifest.xml :
101 -$(MKDIR) $(subst /,$(PS),$(@D))
102 @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
103 @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
104 @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
95endif
96endif
97
98# rule for component package manifest
99$(OUT_COMP_GEN)/%/manifest.xml :
100 -$(MKDIR) $(subst /,$(PS),$(@D))
101 @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
102 @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
103 @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
105 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:meda-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
104 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
106 @echo $(SQM) $(SQM)manifest:full-path="$(QM)CalcWindowState.xcu$(QM)"/$(CSEP) >> $@
107 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
108 @echo $(SQM) $(SQM)manifest:full-path="$(QM)DrawWindowState.xcu$(QM)"/$(CSEP) >> $@
109 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
110 @echo $(SQM) $(SQM)manifest:full-path="$(QM)ImpressWindowState.xcu$(QM)"/$(CSEP) >> $@
111 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
112 @echo $(SQM) $(SQM)manifest:full-path="$(QM)WriterWindowState.xcu$(QM)"/$(CSEP) >> $@
113 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@

--- 15 unchanged lines hidden (view full) ---

129
130# rule for component package file
131$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) WriterWindowState.xcu CalcWindowState.xcu DrawWindowState.xcu ImpressWindowState.xcu Factories.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
132 -$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
133 -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
134 $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
135 cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_NAME).components
136 cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(UNOPKG_PLATFORM)/$(<F)
105 @echo $(SQM) $(SQM)manifest:full-path="$(QM)CalcWindowState.xcu$(QM)"/$(CSEP) >> $@
106 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
107 @echo $(SQM) $(SQM)manifest:full-path="$(QM)DrawWindowState.xcu$(QM)"/$(CSEP) >> $@
108 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
109 @echo $(SQM) $(SQM)manifest:full-path="$(QM)ImpressWindowState.xcu$(QM)"/$(CSEP) >> $@
110 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
111 @echo $(SQM) $(SQM)manifest:full-path="$(QM)WriterWindowState.xcu$(QM)"/$(CSEP) >> $@
112 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@

--- 15 unchanged lines hidden (view full) ---

128
129# rule for component package file
130$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) WriterWindowState.xcu CalcWindowState.xcu DrawWindowState.xcu ImpressWindowState.xcu Factories.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
131 -$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
132 -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
133 $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
134 cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_NAME).components
135 cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(UNOPKG_PLATFORM)/$(<F)
137 $(SDK_ZIP) -u $@ WriterWindowState.xcu CalcWindowState.xcu DrawWindowState.xcu ImpressWindowState.xcu Factories.xcu panel.png
136 $(SDK_ZIP) -u $@ WriterWindowState.xcu CalcWindowState.xcu DrawWindowState.xcu ImpressWindowState.xcu Factories.xcu panel.png
138 cd $(subst /,$(PS),$(OUT_COMP_GEN)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
139
140CustomToolPanelExample : $(COMP_PACKAGE)
141 @echo --------------------------------------------------------------------------------
142 @echo Please use the following command to deploy the example!
143 @echo -
144 @echo $(MAKE) CustomToolPanelExample.run
145 @echo -
146 @echo --------------------------------------------------------------------------------
147
148CustomToolPanelExample.run: $(OXT_DEPLOYEDFLAG)
137 cd $(subst /,$(PS),$(OUT_COMP_GEN)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
138
139CustomToolPanelExample : $(COMP_PACKAGE)
140 @echo --------------------------------------------------------------------------------
141 @echo Please use the following command to deploy the example!
142 @echo -
143 @echo $(MAKE) CustomToolPanelExample.run
144 @echo -
145 @echo --------------------------------------------------------------------------------
146
147CustomToolPanelExample.run: $(OXT_DEPLOYEDFLAG)
149 "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(OFFICE_START_OPTIONS) $(ENV_USER_INSTALL)
148 "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(OFFICE_START_OPTIONS) $(ENV_USER_INSTALL)
150
151$(OXT_DEPLOYEDFLAG) : $(COMP_PACKAGE)
152 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
153 -$(MKDIR) $(subst /,$(PS),$(OUT_DEPLOY))
154 -$(MKDIR) $(subst /,$(PS),$(OUT_DEPLOY_DIR))
155 $(DEPLOYTOOL) $(COMP_PACKAGE_URL) $(ENV_USER_INSTALL)
156 @echo flagged > $(subst /,$(PS),$@)
157
158.PHONY: clean
159clean :
160 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
161 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
162 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
163 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_DEPLOY_DIR))
164 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
165 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_TYPEFLAG)))
166 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OXT_DEPLOYEDFLAG)))
167 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))
149
150$(OXT_DEPLOYEDFLAG) : $(COMP_PACKAGE)
151 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
152 -$(MKDIR) $(subst /,$(PS),$(OUT_DEPLOY))
153 -$(MKDIR) $(subst /,$(PS),$(OUT_DEPLOY_DIR))
154 $(DEPLOYTOOL) $(COMP_PACKAGE_URL) $(ENV_USER_INSTALL)
155 @echo flagged > $(subst /,$(PS),$@)
156
157.PHONY: clean
158clean :
159 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
160 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
161 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
162 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_DEPLOY_DIR))
163 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
164 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_TYPEFLAG)))
165 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OXT_DEPLOYEDFLAG)))
166 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))