blob: 77eb96dc4dc4c3ab542b3faf931f52d1e110181f [file] [log] [blame]
Chris Lattnerbda0b622008-03-15 23:59:48 +00001##===- clang/lib/Headers/Makefile --------------------------*- Makefile -*-===##
Chris Lattneraba51222008-03-03 01:22:28 +00002#
3# The LLVM Compiler Infrastructure
4#
5# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
7#
8##===----------------------------------------------------------------------===##
9
Chris Lattnerbda0b622008-03-15 23:59:48 +000010LEVEL = ../../../..
Chris Lattneraba51222008-03-03 01:22:28 +000011include $(LEVEL)/Makefile.common
12
Daniel Dunbaradcf5b32009-02-21 20:52:41 +000013# FIXME: Get version from a common place.
14HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/1.0/include
Chris Lattneraba51222008-03-03 01:22:28 +000015
16HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h))
17
18OBJHEADERS := $(addprefix $(HeaderDir)/, $(HEADERS))
19
20
21$(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir
Chris Lattner0ec82422008-03-09 01:29:23 +000022 $(Verb) cp $< $@
Daniel Dunbaradcf5b32009-02-21 20:52:41 +000023 $(Echo) Copying $(notdir $<) to build dir
24
Chris Lattneraba51222008-03-03 01:22:28 +000025# Hook into the standard Makefile rules.
26all-local:: $(OBJHEADERS)
27
Daniel Dunbaradcf5b32009-02-21 20:52:41 +000028PROJ_headers := $(DESTDIR)$(PROJ_prefix)/lib/clang/1.0/include
Chris Lattneraba51222008-03-03 01:22:28 +000029
30INSTHEADERS := $(addprefix $(PROJ_headers)/, $(HEADERS))
31
Mike Stump37338312009-01-22 02:53:03 +000032$(PROJ_headers):
33 $(Verb) $(MKDIR) $@
34
35$(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h | $(PROJ_headers)
Chris Lattneraba51222008-03-03 01:22:28 +000036 $(Verb) $(DataInstall) $< $(PROJ_headers)
Daniel Dunbaradcf5b32009-02-21 20:52:41 +000037 $(Echo) Installing compiler include file: $(notdir $<)
Chris Lattneraba51222008-03-03 01:22:28 +000038
39install-local:: $(INSTHEADERS)
40