Chris Lattner | bda0b62 | 2008-03-15 23:59:48 +0000 | [diff] [blame] | 1 | ##===- clang/lib/Basic/Makefile ----------------------------*- Makefile -*-===## |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 2 | # |
| 3 | # The LLVM Compiler Infrastructure |
| 4 | # |
Chris Lattner | 6298b8c | 2007-12-29 20:02:25 +0000 | [diff] [blame] | 5 | # This file is distributed under the University of Illinois Open Source |
| 6 | # License. See LICENSE.TXT for details. |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 7 | # |
| 8 | ##===----------------------------------------------------------------------===## |
| 9 | # |
| 10 | # This implements the Basic library for the C-Language front-end. |
| 11 | # |
| 12 | ##===----------------------------------------------------------------------===## |
| 13 | |
Daniel Dunbar | afed099 | 2010-06-08 20:34:18 +0000 | [diff] [blame] | 14 | CLANG_LEVEL := ../.. |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 15 | LIBRARYNAME := clangBasic |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 16 | |
Daniel Dunbar | afed099 | 2010-06-08 20:34:18 +0000 | [diff] [blame] | 17 | include $(CLANG_LEVEL)/Makefile |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 18 | |
Daniel Dunbar | 16a8fb7 | 2010-09-29 19:15:29 +0000 | [diff] [blame^] | 19 | SVN_REVISION := $(strip \ |
| 20 | $(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(PROJ_SRC_DIR)/../..)) |
Douglas Gregor | b8d1191 | 2009-10-05 20:33:49 +0000 | [diff] [blame] | 21 | |
Daniel Dunbar | 16a8fb7 | 2010-09-29 19:15:29 +0000 | [diff] [blame^] | 22 | SVN_REPOSITORY := $(strip \ |
| 23 | $(shell $(LLVM_SRC_ROOT)/utils/GetRepositoryPath $(PROJ_SRC_DIR)/../..)) |
Daniel Dunbar | 640cf37 | 2010-09-29 17:57:10 +0000 | [diff] [blame] | 24 | |
Douglas Gregor | b8d1191 | 2009-10-05 20:33:49 +0000 | [diff] [blame] | 25 | CPP.Defines += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include \ |
Daniel Dunbar | 640cf37 | 2010-09-29 17:57:10 +0000 | [diff] [blame] | 26 | -DSVN_REVISION='"$(SVN_REVISION)"' -DSVN_REPOSITORY='"$(SVN_REPOSITORY)"' |
Douglas Gregor | b8d1191 | 2009-10-05 20:33:49 +0000 | [diff] [blame] | 27 | |
| 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 |