blob: ae3ffa2a52e2abc02974645614000ae2301f9da5 [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 = .
Reid Spencerf13562f2004-08-29 19:33:21 +000010DIRS = lib/System 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
Reid Spencer5f285392004-08-24 16:32:21 +000014OPTIONAL_DIRS = examples 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 \
John Criswell794cbc22004-09-17 15:08:25 +000024 $(LEVEL)/include/llvm/Config/config.h \
John Criswelld741bcf2003-08-12 18:51:51 +000025 $(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
Reid Spencer4f840ed2004-05-25 20:01:25 +000036 cd include && find * -path '*/Internal' -prune -o '(' '!' '(' -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))
Reid Spencer4f840ed2004-05-25 20:01:25 +000038 cd $(BUILD_SRC_ROOT)/include && find * -path '*/Internal' -prune -o '(' '!' '(' -name '*~' -o -name .cvsignore ')' -print ')' | grep -v CVS | pax -rwdvpe $(DESTDIR)$(includedir)/llvm
Brian Gaeke89409b62004-02-10 01:10:01 +000039endif
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
Chris Lattner129f6cf2004-06-24 18:19:42 +000048all::
Brian Gaeke6fdaf4a2004-01-22 21:54:51 +000049
50tags:
Reid Spencer431c8762004-06-11 03:10:27 +000051 find $(wildcard $(SourceDir)/include $(SourceDir)/lib $(SourceDir)/tools) -name '*.cpp' -o -name '*.h' | $(ETAGS) $(ETAGSFLAGS) -
Brian Gaeke6fdaf4a2004-01-22 21:54:51 +000052