Makefile (abfe7a5a) Makefile (b591cb74)
1#**************************************************************
1#**************************************************************
2#
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
9# with the License. You may obtain a copy of the License at
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
9# with the License. You may obtain a copy of the License at
10#
10#
11# http://www.apache.org/licenses/LICENSE-2.0
11# http://www.apache.org/licenses/LICENSE-2.0
12#
12#
13# Unless required by applicable law or agreed to in writing,
14# software distributed under the License is distributed on an
15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16# KIND, either express or implied. See the License for the
17# specific language governing permissions and limitations
18# under the License.
13# Unless required by applicable law or agreed to in writing,
14# software distributed under the License is distributed on an
15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16# KIND, either express or implied. See the License for the
17# specific language governing permissions and limitations
18# under the License.
19#
19#
20#**************************************************************
21
22# Builds the custom-tool-panel C++ component example of the SDK.
23
24PRJ=../../..
25SETTINGS=$(PRJ)/settings
26
27include $(SETTINGS)/settings.mk

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

34OUT_COMP_INC=$(OUT_INC)/$(COMP_NAME)
35OUT_COMP_GEN=$(OUT_MISC)/$(COMP_NAME)
36OUT_COMP_SLO=$(OUT_SLO)/$(COMP_NAME)
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
20#**************************************************************
21
22# Builds the custom-tool-panel C++ component example of the SDK.
23
24PRJ=../../..
25SETTINGS=$(PRJ)/settings
26
27include $(SETTINGS)/settings.mk

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

34OUT_COMP_INC=$(OUT_INC)/$(COMP_NAME)
35OUT_COMP_GEN=$(OUT_MISC)/$(COMP_NAME)
36OUT_COMP_SLO=$(OUT_SLO)/$(COMP_NAME)
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_REGISTERFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_register_component.flag
43COMP_TYPEFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_types.flag
44
42COMP_TYPEFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_types.flag
43
45
46# Allow deploying the extension when running it
47
48#this should be in odk/settings/std.mk
49OUT_DEPLOY=$(OUT)/deploy
50
51OUT_COMP_DEPLOY=$(OUT_DEPLOY)/$(COMP_NAME)
52OUT_DEPLOY_DIR=$(subst /,$(PS),$(OUT_COMP_DEPLOY))
44# Allow deploying the extension when running it
45
46#this should be in odk/settings/std.mk
47OUT_DEPLOY=$(OUT)/deploy
48
49OUT_COMP_DEPLOY=$(OUT_DEPLOY)/$(COMP_NAME)
50OUT_DEPLOY_DIR=$(subst /,$(PS),$(OUT_COMP_DEPLOY))
53OUT_DEPLOY_URL=$(URLPREFIX)$(subst \\,\,$(OUT_DEPLOY_DIR))
51OUT_DEPLOY_URL=$(URLPREFIX)$(OUT_COMP_DEPLOY)
54ENV_USER_INSTALL=-env:"UserInstallation=$(OUT_DEPLOY_URL)"
55OFFICE_START_OPTIONS=-nologo -nofirststartwizard -norestore -writer
56OXT_DEPLOYEDFLAG=$(OUT_MISC)/cpp_$(COMP_NAME)_deployed_oxt.flag
57
52ENV_USER_INSTALL=-env:"UserInstallation=$(OUT_DEPLOY_URL)"
53OFFICE_START_OPTIONS=-nologo -nofirststartwizard -norestore -writer
54OXT_DEPLOYEDFLAG=$(OUT_MISC)/cpp_$(COMP_NAME)_deployed_oxt.flag
55
58
59CXXFILES = \
60 ctp_factory.cxx \
61 ctp_panel.cxx \
62 ctp_services.cxx
63
64SLOFILES = $(patsubst %.cxx,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(CXXFILES))
65
66# Add OSL_DEBUG_LEVEL to compiler the flags (for OSL_TRACE et. al.)

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

142 -$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
143 -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
144 $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
145 cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_NAME).components
146 cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(UNOPKG_PLATFORM)/$(<F)
147 $(SDK_ZIP) -u $@ WriterWindowState.xcu CalcWindowState.xcu DrawWindowState.xcu ImpressWindowState.xcu Factories.xcu panel.png
148 cd $(subst /,$(PS),$(OUT_COMP_GEN)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
149
56CXXFILES = \
57 ctp_factory.cxx \
58 ctp_panel.cxx \
59 ctp_services.cxx
60
61SLOFILES = $(patsubst %.cxx,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(CXXFILES))
62
63# Add OSL_DEBUG_LEVEL to compiler the flags (for OSL_TRACE et. al.)

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

139 -$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
140 -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
141 $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
142 cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_NAME).components
143 cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(UNOPKG_PLATFORM)/$(<F)
144 $(SDK_ZIP) -u $@ WriterWindowState.xcu CalcWindowState.xcu DrawWindowState.xcu ImpressWindowState.xcu Factories.xcu panel.png
145 cd $(subst /,$(PS),$(OUT_COMP_GEN)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
146
150
151CustomToolPanelExample : $(COMP_PACKAGE)
152 @echo --------------------------------------------------------------------------------
153 @echo Please use the following command to deploy the example!
154 @echo -
155 @echo $(MAKE) CustomToolPanelExample.run
156 @echo -
157 @echo --------------------------------------------------------------------------------
158
147CustomToolPanelExample : $(COMP_PACKAGE)
148 @echo --------------------------------------------------------------------------------
149 @echo Please use the following command to deploy the example!
150 @echo -
151 @echo $(MAKE) CustomToolPanelExample.run
152 @echo -
153 @echo --------------------------------------------------------------------------------
154
159
160CustomToolPanelExample.run: $(OXT_DEPLOYEDFLAG)
161 "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(OFFICE_START_OPTIONS) $(ENV_USER_INSTALL)
162
163$(OXT_DEPLOYEDFLAG) : $(COMP_PACKAGE)
164 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
165 -$(MKDIR) $(subst /,$(PS),$(OUT_DEPLOY))
166 -$(MKDIR) $(subst /,$(PS),$(OUT_DEPLOY_DIR))
167 $(DEPLOYTOOL) $(COMP_PACKAGE_URL) $(ENV_USER_INSTALL)
168 @echo flagged > $(subst /,$(PS),$@)
169
155CustomToolPanelExample.run: $(OXT_DEPLOYEDFLAG)
156 "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(OFFICE_START_OPTIONS) $(ENV_USER_INSTALL)
157
158$(OXT_DEPLOYEDFLAG) : $(COMP_PACKAGE)
159 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
160 -$(MKDIR) $(subst /,$(PS),$(OUT_DEPLOY))
161 -$(MKDIR) $(subst /,$(PS),$(OUT_DEPLOY_DIR))
162 $(DEPLOYTOOL) $(COMP_PACKAGE_URL) $(ENV_USER_INSTALL)
163 @echo flagged > $(subst /,$(PS),$@)
164
170
171
172
173.PHONY: clean
174clean :
175 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
176 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
177 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
178 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_DEPLOY_DIR))
179 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
165.PHONY: clean
166clean :
167 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
168 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
169 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
170 -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_DEPLOY_DIR))
171 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
180 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_REGISTERFLAG)))
181 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_TYPEFLAG)))
182 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OXT_DEPLOYEDFLAG)))
183 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))
172 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_TYPEFLAG)))
173 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OXT_DEPLOYEDFLAG)))
174 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))