blob: 7146bfbef52ef6d0e99dcd254b1ffd90a8b7a539 [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
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