blob: f7335789384f4edb262eaf581077e7629cda9dc4 [file] [log] [blame]
Chris Lattnerbda0b622008-03-15 23:59:48 +00001##===- clang/lib/Basic/Makefile ----------------------------*- Makefile -*-===##
Reid Spencer5f016e22007-07-11 17:01:13 +00002#
3# The LLVM Compiler Infrastructure
4#
Chris Lattner6298b8c2007-12-29 20:02:25 +00005# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
Reid Spencer5f016e22007-07-11 17:01:13 +00007#
8##===----------------------------------------------------------------------===##
9#
10# This implements the Basic library for the C-Language front-end.
11#
12##===----------------------------------------------------------------------===##
13
Chris Lattnerbda0b622008-03-15 23:59:48 +000014LEVEL = ../../../..
Reid Spencer5f016e22007-07-11 17:01:13 +000015LIBRARYNAME := clangBasic
16BUILD_ARCHIVE = 1
17CXXFLAGS = -fno-rtti
18
Douglas Gregora393e9e2009-03-16 23:06:59 +000019CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
Ted Kremenek3687a5d2010-01-22 22:29:50 +000020ifdef CLANG_VENDOR
21CPPFLAGS += -DCLANG_VENDOR='"$(CLANG_VENDOR) "'
22endif
Reid Spencer5f016e22007-07-11 17:01:13 +000023
24include $(LEVEL)/Makefile.common
25
Daniel Dunbar38474aa2010-01-21 16:56:47 +000026SVN_REVISION := $(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(PROJ_SRC_DIR)/../..)
Douglas Gregorb8d11912009-10-05 20:33:49 +000027
28CPP.Defines += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include \
29 -DSVN_REVISION='"$(SVN_REVISION)"'
30
31$(ObjDir)/.ver-svn .ver: $(ObjDir)/.dir
32 @if [ '$(SVN_REVISION)' != '$(shell cat $(ObjDir)/.ver-svn 2>/dev/null)' ]; then\
33 echo '$(SVN_REVISION)' > $(ObjDir)/.ver-svn; \
34 fi
35$(ObjDir)/.ver-svn: .ver
36$(ObjDir)/Version.o: $(ObjDir)/.ver-svn