summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsolenv/gbuild/templates/AllLangResTarget.mk49
-rwxr-xr-xsolenv/gbuild/templates/CppunitTest.mk40
-rwxr-xr-xsolenv/gbuild/templates/Executable.mk61
-rwxr-xr-xsolenv/gbuild/templates/JunitTest.mk49
-rwxr-xr-xsolenv/gbuild/templates/Library.mk104
-rwxr-xr-xsolenv/gbuild/templates/Makefile38
-rwxr-xr-xsolenv/gbuild/templates/Module.mk45
-rwxr-xr-xsolenv/gbuild/templates/Package.mk42
-rwxr-xr-xsolenv/gbuild/templates/StaticLibrary.mk35
-rwxr-xr-xsolenv/gbuild/templates/makefile.mk40
10 files changed, 503 insertions, 0 deletions
diff --git a/solenv/gbuild/templates/AllLangResTarget.mk b/solenv/gbuild/templates/AllLangResTarget.mk
new file mode 100755
index 000000000000..3e32f48960e4
--- /dev/null
+++ b/solenv/gbuild/templates/AllLangResTarget.mk
@@ -0,0 +1,49 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# RES is the name of the resource; its file name will be RES-LOCALE.res
+# MODULE is the name of the code module the makefile is located in
+
+$(eval $(call gb_AllLangResTarget_AllLangResTarget,RES))
+
+# declaration of images folder (e.g. default_images/MODULE/res)
+$(eval $(call gb_AllLangResTarget_set_reslocation,RES,MODULE))
+
+# declaration of a resource intermediate file (srs)
+$(eval $(call gb_AllLangResTarget_add_srs,RES, RES/res))
+$(eval $(call gb_SrsTarget_SrsTarget,RES/res))
+
+# add any additional include paths here
+$(eval $(call gb_SrsTarget_set_include,RES/res,\
+ $$(INCLUDE) \
+))
+
+# add src files here (complete path relative to repository root)
+$(eval $(call gb_SrsTarget_add_files,RES/res,\
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/templates/CppunitTest.mk b/solenv/gbuild/templates/CppunitTest.mk
new file mode 100755
index 000000000000..5395b8765f2c
--- /dev/null
+++ b/solenv/gbuild/templates/CppunitTest.mk
@@ -0,0 +1,40 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,MODULE_NAME))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,MODULE_NAME, \
+))
+
+$(eval $(call gb_CppunitTest_add_linked_libs,MODULE_NAME, \
+))
+
+$(eval $(call gb_CppunitTest_set_include,MODULE_NAME,\
+ $$(INCLUDE) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/templates/Executable.mk b/solenv/gbuild/templates/Executable.mk
new file mode 100755
index 000000000000..8fc7e1cc6843
--- /dev/null
+++ b/solenv/gbuild/templates/Executable.mk
@@ -0,0 +1,61 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Executable_Executable,EXEC))
+
+$(eval $(call gb_Executable_set_include,EXEC,\
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_Executable_set_cxxflags,EXEC,\
+ $$(CXXFLAGS) \
+))
+
+$(eval $(call gb_Executable_add_linked_libs,EXEC,\
+))
+
+$(eval $(call gb_Executable_add_exception_objects,EXEC,\
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_Executable_add_linked_libs,mkunroll,\
+ kernel32 \
+ msvcrt \
+ oldnames \
+ user32 \
+ uwinapi \
+))
+endif
+
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Executable_add_linked_libs,mkunroll,\
+ dl \
+ pthread \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/templates/JunitTest.mk b/solenv/gbuild/templates/JunitTest.mk
new file mode 100755
index 000000000000..e892850bfd9d
--- /dev/null
+++ b/solenv/gbuild/templates/JunitTest.mk
@@ -0,0 +1,49 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_JunitTest_JunitTest,MODULE_TYPE))
+
+$(eval $(call gb_JunitTest_set_defs,MODULE_TYPE,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/MODULE/DOCUMENTPATH \
+))
+
+$(eval $(call gb_JunitTest_add_jars,MODULE_TYPE,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
+
+$(eval $(call gb_JunitTest_add_sourcefiles,MODULE_TYPE,\
+))
+
+$(eval $(call gb_JunitTest_add_classes,MODULE_COMPLEX,\
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/templates/Library.mk b/solenv/gbuild/templates/Library.mk
new file mode 100755
index 000000000000..e62e81a75b08
--- /dev/null
+++ b/solenv/gbuild/templates/Library.mk
@@ -0,0 +1,104 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# MODULE is the name of the module the makefile is located in
+
+# declare a library
+# LIB is the name of the library as it is found in Repository.mk
+$(eval $(call gb_Library_Library,LIB))
+
+# declare packages that will be delivered before compilation of LIB
+# learn more about TYPE in the Package.mk template
+$(eval $(call gb_Library_add_package_headers,LIB,MODULE_TYPE))
+
+# for platforms supporting PCH: declare the location of the pch file
+# this is the name of the cxx file (without extension)
+$(eval $(call gb_Library_add_precompiled_header,LIB,$(SRCDIR)/MODULE/PCH_FILE))
+
+# in case UNO services are exported: declare location of component file
+$(eval $(call gb_Library_set_componentfile,LIB,MODULE/COMPONENT_FILE))
+
+# add any additional include paths for this library here
+$(eval $(call gb_Library_set_include,LIB,\
+ $$(INCLUDE) \
+))
+
+# add any additional definitions to be set for compilation here
+# (e.g. -DLIB_DLLIMPLEMENTATION)
+$(eval $(call gb_Library_set_defs,LIB,\
+ $$(DEFS) \
+))
+
+# add libraries to be linked to LIB; again these names need to be given as
+# specified in Repository.mk
+$(eval $(call gb_Library_add_linked_libs,LIB,\
+))
+
+# this code usually will be platform specific; these libraries are also defined in Repository.mk
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_add_linked_libs,LIB,\
+ dl \
+ m \
+ pthread \
+))
+endif
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_Library_add_linked_libs,LIB,\
+ kernel32 \
+ msvcrt \
+ oldnames \
+ user32 \
+))
+endif
+
+# add all source files that shall be compiled with exceptions enabled
+# the name is relative to $(SRCROOT) and must not contain an extension
+$(eval $(call gb_Library_add_exception_objects,LIB,\
+))
+
+# in case sdi files need to be processed: declare "root" (main) sdi target and sdi header target
+# "ROOT_SDI_FILE" is the file that is handed over to svidl (all other sdi files are included in the root file)
+$(eval $(call gb_Library_add_sdi_headers,LIB,MODULE/sdi/ROOT_SDI_FILE))
+$(eval $(call gb_SdiTarget_SdiTarget,MODULE/sdi/ROOT_SDI_FILE,MODULE/sdi/LIB))
+
+# add any additional include paths for sdi processing here
+$(eval $(call gb_SdiTarget_set_include,MODULE/sdi/ROOT_SDI_FILE,\
+ $$(INCLUDE) \
+))
+
+# this is an example how files can be added that require special compiler settings
+ifeq ($(OS),WNT)
+$(eval $(call gb_Library_add_cxxobjects,LIB,\
+ MODULE/source/foo/bar \
+ , $(gb_LinkTarget_EXCEPTIONFLAGS) -nologo -UPRECOMPILED_HEADERS \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
+
diff --git a/solenv/gbuild/templates/Makefile b/solenv/gbuild/templates/Makefile
new file mode 100755
index 000000000000..a79aff831024
--- /dev/null
+++ b/solenv/gbuild/templates/Makefile
@@ -0,0 +1,38 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/templates/Module.mk b/solenv/gbuild/templates/Module.mk
new file mode 100755
index 000000000000..77555f4fa735
--- /dev/null
+++ b/solenv/gbuild/templates/Module.mk
@@ -0,0 +1,45 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# replace MODULE by the name of the module you are creating
+
+$(eval $(call gb_Module_Module,MODULE))
+
+# the targets to be inserted are their file names without .mk extension
+$(eval $(call gb_Module_add_targets,MODULE,\
+))
+
+# add any runtime tests (unit tests) here
+# remove if no tests
+$(eval $(call gb_Module_add_check_targets,MODULE,\
+))
+
+# add any subsequent checks (e.g. complex tests) here
+$(eval $(call gb_Module_add_subsequentcheck_targets,MODULE,\
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/templates/Package.mk b/solenv/gbuild/templates/Package.mk
new file mode 100755
index 000000000000..cb2d84ec9777
--- /dev/null
+++ b/solenv/gbuild/templates/Package.mk
@@ -0,0 +1,42 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# MODULE is the name of the module the makefile is located in
+
+# TYPE is an arbitrary name that should denote what is inside this package
+# typical names are "inc", "uiconfig", "xml" etc.
+# "MODULE_TYPE" is the package name
+# the file name of the corresponding makefile should be Package_TYPE.mk
+# SOURCE is the name of the root folder of the package that shall be delivered
+$(eval $(call gb_Package_Package,MODULE_TYPE,$(SRCDIR)/MODULE/SOURCE))
+
+# add files to the package
+# SOURCE_RELPATH/file.ext is the name of the source file (relative to the root give above)
+# DESTINATION_RELPATH/file.ext is the destination file (relative to $(OUTDIR))
+$(eval $(call gb_Package_add_file,MODULE_TYPE,DESTINATION_RELPATH/file.ext,SOURCE_RELPATH/file.ext))
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/templates/StaticLibrary.mk b/solenv/gbuild/templates/StaticLibrary.mk
new file mode 100755
index 000000000000..70fa20799fb6
--- /dev/null
+++ b/solenv/gbuild/templates/StaticLibrary.mk
@@ -0,0 +1,35 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,LIB))
+
+$(eval $(call gb_StaticLibrary_add_package_headers,LIB,MODULE_inc))
+
+$(eval $(call gb_StaticLibrary_add_exception_objects,LIB,\
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/templates/makefile.mk b/solenv/gbuild/templates/makefile.mk
new file mode 100755
index 000000000000..c73a3d944bbf
--- /dev/null
+++ b/solenv/gbuild/templates/makefile.mk
@@ -0,0 +1,40 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..
+TARGET=prj
+
+.INCLUDE : settings.mk
+
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET)