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
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
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.
19#
20#**************************************************************
21
22
23
24# MODULE is the name of the module the makefile is located in
25
26# declare a library
27# LIB is the name of the library as it is found in Repository.mk
28$(eval $(call gb_Library_Library,LIB))
29
30# declare packages that will be delivered before compilation of LIB
31# learn more about TYPE in the Package.mk template
32$(eval $(call gb_Library_add_package_headers,LIB,MODULE_TYPE))
33
34# for platforms supporting PCH: declare the location of the pch file
35# this is the name of the cxx file (without extension)
36$(eval $(call gb_Library_add_precompiled_header,LIB,$(SRCDIR)/MODULE/PCH_FILE))
37
38# in case UNO services are exported: declare location of component file
39$(eval $(call gb_Library_set_componentfile,LIB,MODULE/COMPONENT_FILE))
40
41# add any additional include paths for this library here
42$(eval $(call gb_Library_set_include,LIB,\
43	$$(INCLUDE) \
44))
45
46# add any additional definitions to be set for compilation here
47# (e.g. -DLIB_DLLIMPLEMENTATION)
48$(eval $(call gb_Library_set_defs,LIB,\
49	$$(DEFS) \
50))
51
52# add libraries to be linked to LIB; again these names need to be given as
53# specified in Repository.mk
54$(eval $(call gb_Library_add_linked_libs,LIB,\
55    $(gb_STDLIBS) \
56))
57
58# add all source files that shall be compiled with exceptions enabled
59# the name is relative to $(SRCROOT) and must not contain an extension
60$(eval $(call gb_Library_add_exception_objects,LIB,\
61))
62
63# in case sdi files need to be processed: declare "root" (main) sdi target and sdi header target
64# "ROOT_SDI_FILE" is the file that is handed over to svidl (all other sdi files are included in the root file)
65$(eval $(call gb_Library_add_sdi_headers,LIB,MODULE/sdi/ROOT_SDI_FILE))
66$(eval $(call gb_SdiTarget_SdiTarget,MODULE/sdi/ROOT_SDI_FILE,MODULE/sdi/LIB))
67
68# add any additional include paths for sdi processing here
69$(eval $(call gb_SdiTarget_set_include,MODULE/sdi/ROOT_SDI_FILE,\
70	$$(INCLUDE) \
71))
72
73# this is an example how files can be added that require special compiler settings, e.g. building without optimizing
74ifeq ($(OS),WNT)
75$(eval $(call gb_Library_add_cxxobjects,LIB,\
76    MODULE/source/foo/bar \
77    , $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \
78))
79
80endif
81
82# vim: set noet sw=4 ts=4:
83