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_add_defs,LIB,\ 49#)) 50 51# add libraries to be linked to LIB; again these names need to be given as 52# specified in Repository.mk 53$(eval $(call gb_Library_add_linked_libs,LIB,\ 54 $(gb_STDLIBS) \ 55)) 56 57# add all source files that shall be compiled with exceptions enabled 58# the name is relative to $(SRCROOT) and must not contain an extension 59$(eval $(call gb_Library_add_exception_objects,LIB,\ 60)) 61 62# in case sdi files need to be processed: declare "root" (main) sdi target and sdi header target 63# "ROOT_SDI_FILE" is the file that is handed over to svidl (all other sdi files are included in the root file) 64$(eval $(call gb_Library_add_sdi_headers,LIB,MODULE/sdi/ROOT_SDI_FILE)) 65$(eval $(call gb_SdiTarget_SdiTarget,MODULE/sdi/ROOT_SDI_FILE,MODULE/sdi/LIB)) 66 67# add any additional include paths for sdi processing here 68$(eval $(call gb_SdiTarget_set_include,MODULE/sdi/ROOT_SDI_FILE,\ 69 $$(INCLUDE) \ 70)) 71 72# this is an example how files can be added that require special compiler settings, e.g. building without optimizing 73ifeq ($(OS),WNT) 74$(eval $(call gb_Library_add_cxxobjects,LIB,\ 75 MODULE/source/foo/bar \ 76 , $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \ 77)) 78 79endif 80 81# vim: set noet sw=4 ts=4: 82