blob: 61accba0b5d22da2058224c0686420919b7d67ad [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
Daniel Dunbarafed0992010-06-08 20:34:18 +000014CLANG_LEVEL := ../..
Reid Spencer5f016e22007-07-11 17:01:13 +000015LIBRARYNAME := clangBasic
Reid Spencer5f016e22007-07-11 17:01:13 +000016
Daniel Dunbarafed0992010-06-08 20:34:18 +000017include $(CLANG_LEVEL)/Makefile
Reid Spencer5f016e22007-07-11 17:01:13 +000018
Daniel Dunbar16a8fb72010-09-29 19:15:29 +000019SVN_REVISION := $(strip \
20 $(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(PROJ_SRC_DIR)/../..))
Douglas Gregorb8d11912009-10-05 20:33:49 +000021
Daniel Dunbar16a8fb72010-09-29 19:15:29 +000022SVN_REPOSITORY := $(strip \
23 $(shell $(LLVM_SRC_ROOT)/utils/GetRepositoryPath $(PROJ_SRC_DIR)/../..))
Daniel Dunbar640cf372010-09-29 17:57:10 +000024
Douglas Gregorb8d11912009-10-05 20:33:49 +000025CPP.Defines += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include \
Daniel Dunbar640cf372010-09-29 17:57:10 +000026 -DSVN_REVISION='"$(SVN_REVISION)"' -DSVN_REPOSITORY='"$(SVN_REPOSITORY)"'
Douglas Gregorb8d11912009-10-05 20:33:49 +000027
28$(ObjDir)/.ver-svn .ver: $(ObjDir)/.dir
29 @if [ '$(SVN_REVISION)' != '$(shell cat $(ObjDir)/.ver-svn 2>/dev/null)' ]; then\
30 echo '$(SVN_REVISION)' > $(ObjDir)/.ver-svn; \
31 fi
32$(ObjDir)/.ver-svn: .ver
33$(ObjDir)/Version.o: $(ObjDir)/.ver-svn