blob: 7af7f0f87004095dd658058059145bccaf7a9b32 [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
13HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/Headers
14
15HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h))
16
17OBJHEADERS := $(addprefix $(HeaderDir)/, $(HEADERS))
18
19
20$(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir
Chris Lattner0ec82422008-03-09 01:29:23 +000021 $(Verb) cp $< $@
22 @echo Copying $(notdir $<) to build dir
Chris Lattneraba51222008-03-03 01:22:28 +000023
24printit:
25 echo $(OBJHEADERS)
26 echo $(PROJ_SRC_DIR)
27
28# Hook into the standard Makefile rules.
29all-local:: $(OBJHEADERS)
30
31PROJ_headers := $(DESTDIR)$(PROJ_prefix)/Headers
32
33INSTHEADERS := $(addprefix $(PROJ_headers)/, $(HEADERS))
34
35$(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h $(PROJ_headers)/.dir
36 $(Verb) $(DataInstall) $< $(PROJ_headers)
37
38install-local:: $(INSTHEADERS)
39