1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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 ############################################
44 TARGET
=some_unique_target
46 # --- Settings -----------------------------------------------------
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"
61 @echo
"$(EXTENSIONNAME) - extension disabled."
63 .IF
"$(SOLAR_JAVA)"==""
65 @echo
"$(EXTENSIONNAME) - extension requires java."
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
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
101 $(EXTENSIONDIR
)$/registry
$/data
$/org
$/openoffice
$/Office
$/Data.xcu
103 # location of configurationfiles inside extension,
104 # "." for flat .xcu files
105 #COMPONENT_CONFIGDEST=.
108 COMPONENT_LIBRARIES
= \
109 $(EXTENSIONDIR
)$/$(SHL1TARGET
)$(DLLPOST
)
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...
125 $(EXTENSIONDIR
)$/xMyExtension
$(EXECPOST
) \
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
142 # global targets for extension packing
143 .INCLUDE
: extension_post.mk
146 $(CONVERTER_FILE
) : $(SOLARBINDIR
)$/$$(@
:f
)
147 @@
-$(MKDIRHIER
) $(@
:d
)
150 $(COMPONENT_DIALOGS
) : dialogs
$/$$(@
:f
)
151 @@
-$(MKDIRHIER
) $(@
:d
)
154 $(CUSTOM_LICENSE
) : my_license.txt
155 @@
-$(MKDIRHIER
) $(@
:d
)