blob: 58ac7eb86e75d8cf80001d7cb02a777e2d515b41 [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
Reid Spencer5f016e22007-07-11 17:01:13 +000017
Douglas Gregora393e9e2009-03-16 23:06:59 +000018CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
Ted Kremenek3687a5d2010-01-22 22:29:50 +000019ifdef CLANG_VENDOR
20CPPFLAGS += -DCLANG_VENDOR='"$(CLANG_VENDOR) "'
21endif
Reid Spencer5f016e22007-07-11 17:01:13 +000022
23include $(LEVEL)/Makefile.common
24
Daniel Dunbar38474aa2010-01-21 16:56:47 +000025SVN_REVISION := $(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(PROJ_SRC_DIR)/../..)
Douglas Gregorb8d11912009-10-05 20:33:49 +000026
27CPP.Defines += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include \
28 -DSVN_REVISION='"$(SVN_REVISION)"'
29
30$(ObjDir)/.ver-svn .ver: $(ObjDir)/.dir
31 @if [ '$(SVN_REVISION)' != '$(shell cat $(ObjDir)/.ver-svn 2>/dev/null)' ]; then\
32 echo '$(SVN_REVISION)' > $(ObjDir)/.ver-svn; \
33 fi
34$(ObjDir)/.ver-svn: .ver
35$(ObjDir)/Version.o: $(ObjDir)/.ver-svn