blob: a9a59de8c1ab8120c17b953c6d4e62f0209e6528 [file] [log] [blame]
Misha Brukman6d5ab862004-04-24 00:10:56 +00001#===- ./Makefile -------------------------------------------*- Makefile -*--===#
John Criswelle488e932003-10-20 22:26:57 +00002#
3# The LLVM Compiler Infrastructure
4#
5# This file was developed by the LLVM research group and is distributed under
6# the University of Illinois Open Source License. See LICENSE.TXT for details.
7#
Misha Brukman6d5ab862004-04-24 00:10:56 +00008#===------------------------------------------------------------------------===#
Chris Lattner00950542001-06-06 20:29:01 +00009LEVEL = .
Chris Lattner6a8c2902004-02-03 23:05:24 +000010DIRS = lib/Support utils lib tools
Chris Lattner00950542001-06-06 20:29:01 +000011
Chris Lattner6a8c2902004-02-03 23:05:24 +000012ifneq ($(MAKECMDGOALS),tools-only)
13DIRS += runtime
Brian Gaeked994db02004-04-16 15:57:02 +000014OPTIONAL_DIRS = projects
Chris Lattner6a8c2902004-02-03 23:05:24 +000015endif
16
Chris Lattner00950542001-06-06 20:29:01 +000017include $(LEVEL)/Makefile.common
18
19test :: all
20 cd test; $(MAKE)
John Criswelld741bcf2003-08-12 18:51:51 +000021
22distclean:: clean
23 $(VERB) $(RM) -rf $(LEVEL)/Makefile.config \
24 $(LEVEL)/include/Config/config.h \
25 $(LEVEL)/autoconf/autom4te.cache \
26 $(LEVEL)/config.log \
27 $(LEVEL)/TAGS
28
Chris Lattner9cf662b2004-02-03 22:56:40 +000029tools-only: all
Brian Gaekec5365452003-10-21 18:08:10 +000030
Brian Gaeke6fdaf4a2004-01-22 21:54:51 +000031# Install support for llvm include files:
Brian Gaeke265f0ec2003-12-10 18:41:20 +000032.PHONY: install-includes
33
34install-includes:
Brian Gaeke6c096962004-02-09 17:38:52 +000035 $(MKDIR) $(DESTDIR)$(includedir)/llvm
Brian Gaeke67afaa12004-01-21 23:28:03 +000036 cd include && find * '!' '(' -name '*~' -o -name .cvsignore ')' -print | grep -v CVS | pax -rwdvpe $(DESTDIR)$(includedir)/llvm
Brian Gaeke89409b62004-02-10 01:10:01 +000037ifneq ($(BUILD_SRC_ROOT),$(BUILD_OBJ_ROOT))
38 cd $(BUILD_SRC_ROOT)/include && find * '!' '(' -name '*~' -o -name .cvsignore ')' -print | grep -v CVS | pax -rwdvpe $(DESTDIR)$(includedir)/llvm
39endif
Brian Gaeke265f0ec2003-12-10 18:41:20 +000040
41install:: install-includes
42
Brian Gaeke6fdaf4a2004-01-22 21:54:51 +000043# Build tags database for Emacs/Xemacs:
44.PHONY: tags
45
46TAGS: tags
47
48all:: tags
49
50tags:
51 $(ETAGS) $(ETAGSFLAGS) `find $(wildcard $(SourceDir)/include $(SourceDir)/lib $(SourceDir)/tools) -name '*.cpp' -o -name '*.h'`
52