update dev300-m58
[ooovba.git] / solenv / inc / templates / extension_tmpl.mk
blobfdc597c671649ba877672f0d722b764f32db2a36
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: extension_tmpl.mk,v $
11 # $Revision: 1.3.56.1 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 ############################################
34 # sample makefile for extension packing
36 # NOTE: not all of this is required or useful
37 # for every specific case
39 ############################################
41 PRJ=..$/..
43 PRJNAME=my_project
44 TARGET=some_unique_target
46 # --- Settings -----------------------------------------------------
48 .INCLUDE: settings.mk
49 # it might be useful to have an extension wide include to set things
50 # like the EXTNAME variable (used for configuration processing)
51 # .INCLUDE : $(PRJ)$/source$/<extension name>$/<extension_name>.pmk
53 # --- Files --------------------------------------------------------
55 # name for uniq directory
56 EXTENSIONNAME:=MyExtension
57 EXTENSION_ZIPNAME:=MyExtension
59 .IF "$(ENABLE_MYEXTENSION)" != "YES"
60 @all:
61 @echo "$(EXTENSIONNAME) - extension disabled."
62 .ENDIF
63 .IF "$(SOLAR_JAVA)"==""
64 @all:
65 @echo "$(EXTENSIONNAME) - extension requires java."
66 .ENDIF
69 # some other targets to be done
73 # --- Extension packaging ------------------------------------------
75 # these variables are optional and defaulted to the current directory
77 DESCRIPTION_SRC:=config$/description.xml
78 MANIFEST_SRC:=config$/manifest.xml
79 COMPONENT_CONFIGDIR:=config
81 # ------------------------------------------------------------------
83 # optional: generated list of .xcu files contained in the extension
84 COMPONENT_MANIFEST_GENERIC:=TRUE
85 COMPONENT_MANIFEST_SEARCHDIR:=registry
88 # variables to trigger predifined targets
89 # just copy:
90 COMPONENT_FILES= \
91 $(EXTENSIONDIR)$/xMyExtension$(EXECPOST) \
92 $(EXTENSIONDIR)$/some_local.html
94 # localized configuration files
95 COMPONENT_MERGED_XCU= \
96 $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/Addons.xcu \
97 $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/extension$/MyExtension.xcu
99 # other configuration files
100 COMPONENT_XCU= \
101 $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/Data.xcu
103 # location of configurationfiles inside extension,
104 # "." for flat .xcu files
105 #COMPONENT_CONFIGDEST=.
107 # native libraries
108 COMPONENT_LIBRARIES= \
109 $(EXTENSIONDIR)$/$(SHL1TARGET)$(DLLPOST)
111 # jar files
112 COMPONENT_JARFILES = \
113 $(EXTENSIONDIR)$/MyExtension.jar
115 # disable fetching default OOo license text
116 #CUSTOM_LICENSE=my_license.txt
117 # override default license destination
118 #PACKLICS= $(EXTENSIONDIR)$/registration$/$(CUSTOM_LICENSE)
120 # -------------------------------
121 # variables for own targets specific to this extension; no common
122 # target available...
124 CONVERTER_FILE= \
125 $(EXTENSIONDIR)$/xMyExtension$(EXECPOST) \
127 COMPONENT_DIALOGS= \
128 $(EXTENSIONDIR)$/basic$/Module1.xba \
129 $(EXTENSIONDIR)$/basic$/TargetChooser.xdl \
130 $(EXTENSIONDIR)$/basic$/dialog.xlb \
131 $(EXTENSIONDIR)$/basic$/impress.png \
132 $(EXTENSIONDIR)$/basic$/script.xlb \
133 $(EXTENSIONDIR)$/basic$/writer.png
135 # add own targets to packing dependencies (need to be done before
136 # packing the xtension
137 EXTENSION_PACKDEPS=$(CONVERTER_FILE) $(COMPONENT_DIALOGS) makefile.mk $(CUSTOM_LICENSE)
139 # global settings for extension packing
140 .INCLUDE : extension_pre.mk
141 .INCLUDE : target.mk
142 # global targets for extension packing
143 .INCLUDE : extension_post.mk
145 # own targets
146 $(CONVERTER_FILE) : $(SOLARBINDIR)$/$$(@:f)
147 @@-$(MKDIRHIER) $(@:d)
148 $(COPY) $< $@
150 $(COMPONENT_DIALOGS) : dialogs$/$$(@:f)
151 @@-$(MKDIRHIER) $(@:d)
152 $(COPY) $< $@
154 $(CUSTOM_LICENSE) : my_license.txt
155 @@-$(MKDIRHIER) $(@:d)
156 $(COPY) $< $@