Fixes for PR214. Use the SHLIBEXT variable instead of hardcoding .so into
[oota-llvm.git] / Makefile
1 ##===- ./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 ##===----------------------------------------------------------------------===##
9 LEVEL = .
10 DIRS = lib/Support utils lib tools runtime
11 OPTIONAL_DIRS = projects
12
13 include $(LEVEL)/Makefile.common
14
15 test :: all
16         cd test; $(MAKE)
17
18 distclean:: clean
19         $(VERB) $(RM) -rf $(LEVEL)/Makefile.config \
20                           $(LEVEL)/include/Config/config.h \
21                           $(LEVEL)/autoconf/autom4te.cache \
22                           $(LEVEL)/config.log \
23                           $(LEVEL)/TAGS
24
25 tools-only:
26         @for dir in lib/Support utils lib tools; do $(MAKE) -C $$dir; done
27
28 configure: autoconf/configure.ac autoconf/aclocal.m4
29         cd autoconf && aclocal && autoconf -o ../configure configure.ac
30
31 include/Config/config.h.in: autoconf/configure.ac autoconf/aclocal.m4
32         autoheader -I autoconf autoconf/configure.ac
33
34 # Install support for llvm include files:
35 .PHONY: install-includes
36
37 install-includes:
38         $(MKDIR) $(includedir)/llvm
39         cd include && find * '!' '(' -name '*~' -o -name .cvsignore ')' -print | grep -v CVS | pax -rwdvpe $(DESTDIR)$(includedir)/llvm
40
41 install:: install-includes
42
43 # Build tags database for Emacs/Xemacs:
44 .PHONY: tags
45
46 TAGS: tags
47
48 all:: tags
49
50 tags:
51         $(ETAGS) $(ETAGSFLAGS) `find $(wildcard $(SourceDir)/include $(SourceDir)/lib $(SourceDir)/tools) -name '*.cpp' -o -name '*.h'`
52