blob: 559cdfe8dd61b8957c78063d2d3566d89f9e0585 [file] [log] [blame]
John Criswelle488e932003-10-20 22:26:57 +00001##===- ./Makefile ------------------------------------------*- Makefile -*-===##
2#
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#
8##===----------------------------------------------------------------------===##
Chris Lattner00950542001-06-06 20:29:01 +00009LEVEL = .
Chris Lattner6a8c2902004-02-03 23:05:24 +000010DIRS = lib/Support utils lib tools
John Criswell8bff5092003-06-11 13:55:44 +000011OPTIONAL_DIRS = projects
Chris Lattner00950542001-06-06 20:29:01 +000012
Chris Lattner6a8c2902004-02-03 23:05:24 +000013ifneq ($(MAKECMDGOALS),tools-only)
14DIRS += runtime
15endif
16
17
Chris Lattner00950542001-06-06 20:29:01 +000018include $(LEVEL)/Makefile.common
19
20test :: all
21 cd test; $(MAKE)
John Criswelld741bcf2003-08-12 18:51:51 +000022
23distclean:: clean
24 $(VERB) $(RM) -rf $(LEVEL)/Makefile.config \
25 $(LEVEL)/include/Config/config.h \
26 $(LEVEL)/autoconf/autom4te.cache \
27 $(LEVEL)/config.log \
28 $(LEVEL)/TAGS
29
Chris Lattner9cf662b2004-02-03 22:56:40 +000030tools-only: all
Brian Gaekec5365452003-10-21 18:08:10 +000031
Brian Gaekee9b50902003-10-07 23:44:10 +000032configure: autoconf/configure.ac autoconf/aclocal.m4
Brian Gaekef2920212004-01-13 07:09:56 +000033 cd autoconf && aclocal && autoconf -o ../configure configure.ac
Brian Gaeke75283432003-10-07 17:12:11 +000034
Brian Gaekee9b50902003-10-07 23:44:10 +000035include/Config/config.h.in: autoconf/configure.ac autoconf/aclocal.m4
Brian Gaekef2920212004-01-13 07:09:56 +000036 autoheader -I autoconf autoconf/configure.ac
Brian Gaekee9b50902003-10-07 23:44:10 +000037
Brian Gaeke6fdaf4a2004-01-22 21:54:51 +000038# Install support for llvm include files:
Brian Gaeke265f0ec2003-12-10 18:41:20 +000039.PHONY: install-includes
40
41install-includes:
42 $(MKDIR) $(includedir)/llvm
Brian Gaeke67afaa12004-01-21 23:28:03 +000043 cd include && find * '!' '(' -name '*~' -o -name .cvsignore ')' -print | grep -v CVS | pax -rwdvpe $(DESTDIR)$(includedir)/llvm
Brian Gaeke265f0ec2003-12-10 18:41:20 +000044
45install:: install-includes
46
Brian Gaeke6fdaf4a2004-01-22 21:54:51 +000047# Build tags database for Emacs/Xemacs:
48.PHONY: tags
49
50TAGS: tags
51
52all:: tags
53
54tags:
55 $(ETAGS) $(ETAGSFLAGS) `find $(wildcard $(SourceDir)/include $(SourceDir)/lib $(SourceDir)/tools) -name '*.cpp' -o -name '*.h'`
56