1 ##===- unittests/Makefile.unittest -------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
10 # This file is included by all of the unit test makefiles.
12 ##===----------------------------------------------------------------------===##
14 # Set up variables for building a unit test.
19 include $(LEVEL)/Makefile.common
21 LLVMUnitTestExe = $(BuildMode)/$(TESTNAME)Tests$(EXEEXT)
23 CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include/
24 CPP.Flags += $(NO_VARIADIC_MACROS)
25 TESTLIBS = -lGoogleTest -lUnitTestMain
27 $(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
28 $(Echo) Linking $(BuildMode) unit test $(TESTNAME) $(StripWarnMsg)
29 $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
30 $(TESTLIBS) $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
31 $(Echo) ======= Finished Linking $(BuildMode) Unit test $(TESTNAME) \
34 all:: $(LLVMUnitTestExe)
36 unitcheck:: $(LLVMUnitTestExe)