1#===- lib/ubsan/Makefile.mk ---------------------------------*- Makefile -*--===#
2#
3#                     The LLVM Compiler Infrastructure
4#
5# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
7#
8#===------------------------------------------------------------------------===#
9
10ModuleName := ubsan
11SubDirs :=
12
13Sources := $(foreach file,$(wildcard $(Dir)/*.cc),$(notdir $(file)))
14StandaloneSources := ubsan_init_standalone.cc
15CXXSources := ubsan_type_hash.cc ubsan_handlers_cxx.cc
16CSources := $(filter-out $(StandaloneSources),$(filter-out $(CXXSources),$(Sources)))
17ObjNames := $(Sources:%.cc=%.o)
18
19Implementation := Generic
20
21# FIXME: use automatic dependencies?
22Dependencies := $(wildcard $(Dir)/*.h)
23Dependencies += $(wildcard $(Dir)/../sanitizer_common/*.h)
24
25# Define a convenience variable for all the ubsan functions.
26UbsanFunctions := $(CSources:%.cc=%)
27UbsanCXXFunctions := $(CXXSources:%.cc=%)
28UbsanStandaloneFunctions := $(StandaloneSources:%.cc=%)
29