blob: 7dd5221710057686f583b5944d22984bcda2b0e9 [file] [log] [blame]
Chris Lattner7a513132008-03-15 23:59:48 +00001##===- clang/lib/Basic/Makefile ----------------------------*- Makefile -*-===##
Chris Lattner22eb9722006-06-18 05:43:12 +00002#
3# The LLVM Compiler Infrastructure
4#
Chris Lattner5926c0e2007-12-29 20:02:25 +00005# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
Chris Lattner22eb9722006-06-18 05:43:12 +00007#
8##===----------------------------------------------------------------------===##
9#
10# This implements the Basic library for the C-Language front-end.
11#
12##===----------------------------------------------------------------------===##
13
Daniel Dunbare6c1daa2010-06-08 20:34:18 +000014CLANG_LEVEL := ../..
Chris Lattner22eb9722006-06-18 05:43:12 +000015LIBRARYNAME := clangBasic
Chris Lattner22eb9722006-06-18 05:43:12 +000016
Daniel Dunbare6c1daa2010-06-08 20:34:18 +000017include $(CLANG_LEVEL)/Makefile
Chris Lattner22eb9722006-06-18 05:43:12 +000018
Daniel Dunbarae928712010-01-21 16:56:47 +000019SVN_REVISION := $(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(PROJ_SRC_DIR)/../..)
Douglas Gregor1b7035d2009-10-05 20:33:49 +000020
Daniel Dunbarb800fdb2010-09-29 17:57:10 +000021SVN_REPOSITORY := $(shell $(LLVM_SRC_ROOT)/utils/GetRepositoryPath $(PROJ_SRC_DIR)/../..)
22
Douglas Gregor1b7035d2009-10-05 20:33:49 +000023CPP.Defines += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include \
Daniel Dunbarb800fdb2010-09-29 17:57:10 +000024 -DSVN_REVISION='"$(SVN_REVISION)"' -DSVN_REPOSITORY='"$(SVN_REPOSITORY)"'
Douglas Gregor1b7035d2009-10-05 20:33:49 +000025
26$(ObjDir)/.ver-svn .ver: $(ObjDir)/.dir
27 @if [ '$(SVN_REVISION)' != '$(shell cat $(ObjDir)/.ver-svn 2>/dev/null)' ]; then\
28 echo '$(SVN_REVISION)' > $(ObjDir)/.ver-svn; \
29 fi
30$(ObjDir)/.ver-svn: .ver
31$(ObjDir)/Version.o: $(ObjDir)/.ver-svn