don't emit vfp copies
[libfirm] / MakeTargets
1 #
2 # Project:     libFIRM
3 # File name:   MakeTargets
4 # Purpose:
5 # Author:      nicht Till Riedel, das waren andere
6 # Modified by:
7 # Created:
8 # CVS-ID:      $Id$
9 # Copyright:   (c) 2002-2003 Universität Karlsruhe
10 # Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
11 #
12
13 .PHONY: subdir_all
14
15 all : subdir_all
16
17 # partial linking of a subdir's $(OFILES) into one file
18 subdir.o: $(OFILES)
19 ifeq ($(strip $(OFILES)),)
20         >$@
21 else
22         rm -f $@
23         $(LD) $(LDFLAGS)  -r -o $@ $^
24 endif
25
26 clean: subdir_clean local_clean
27 .PHONY: local_clean
28 local_clean:
29         $(RM) $(OFILES) subdir.o core
30
31 realclean: subdir_realclean local_clean
32         $(RM) $(GENFILES) .depend TAGS $(TARDIRNAME)
33
34 .depend: $(CFILES) $(filter %.h,$(SOURCES) $(GENFILES))
35 ifeq ($(strip $(CFILES)),)
36         >.depend
37 else
38         $(CC) -M $(DEFS) $(CPPFLAGS) $(filter %.c,$^) >.depend || { $(RM) .depend; false; }
39 endif
40
41
42 # generate an archive for distribution
43 distrib: dist
44         $(MAKE) -C testprograms dist
45
46 dist:   subdir_dist local_dist $(TARDIRNAME)
47 #       @echo create archive with $(DISTFILES)
48 #       @echo tar -C $(top_srcdir) -uf libfirm.tar $(ARCHIVEDISTFILES)
49         $(TAR) $(TARFLAGS) $(ARCHIVEDISTFILES)
50 .PHONY: local_dist
51 local_dist:     $(DISTFILES)
52
53 $(TARDIRNAME):
54         $(LN_S) $(top_srcdir) $@
55
56 # dont know about this
57 # Recurse into $(subdirs) for $(targets)
58 $(addprefix subdir_,$(targets)): $(subdirs)
59         +$(recurse)
60
61 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
62         cd $(topdir) && \
63         CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status >&2
64
65 # generate TAGS
66 .PHONY: tags
67 tags:   TAGS
68 TAGS:
69         ctags -R *.[ch]
70
71 # installation
72 install:        $(INCLUDEDIR) $(INCLUDEDIR)/adt install_headers $(LIBDIR) install_libs
73         $(INSTALL) -m u+rwx,a+rx $(addprefix $(topdir)/,libfirm.pc) $(LIBDIR)/pkgconfig
74         @echo ================================================
75         @echo Don\'t forget to add $(LIBDIR) to LD_LIBRARY_PATH
76         @echo Don\'t forget to add /usr/public/libxml2/lib to LD_LIBRARY_PATH
77         @echo ================================================
78
79 install_headers:        subdir_install_headers local_install_headers
80 local_install_headers:
81 ifneq ($(strip $(INSTALL_HEADERS)),)
82         $(INSTALL)  -m u+rw,a+r $(addprefix $(srcdir)/,$(INSTALL_HEADERS)) $(INCLUDEDIR)
83 endif
84 ifneq ($(strip $(INSTALL_GENERATED_HEADERS)),)
85         $(INSTALL)  -m u+rw,a+r $(INSTALL_GENERATED_HEADERS) $(INCLUDEDIR)
86 endif
87 ifneq ($(strip $(INSTALL_HEADERS_ADT)),)
88         $(INSTALL)  -m u+rw,a+r $(addprefix $(srcdir)/,$(INSTALL_HEADERS_ADT)) $(INCLUDEDIR)/adt
89 endif
90
91 install_libs:           subdir_install_libs local_install_libs
92 local_install_libs:
93 ifneq ($(strip $(INSTALL_LIBS)),)
94         $(INSTALL)  -m u+rw,a+r $(addprefix $(topdir)/,$(INSTALL_LIBS)) $(LIBDIR)
95         @# the '.a' is ranlib'ed already, and the '.so' doesn't need ranlib-ing
96         @# $(RANLIB) $(addprefix $(LIBDIR)/,$(INSTALL_LIBS))
97 endif
98
99
100 $(LIBDIR):
101         mkdir -p $@
102
103 $(INCLUDEDIR):
104         mkdir -p $@
105
106 $(INCLUDEDIR)/adt:
107         mkdir -p $@
108
109 # generated the directory where all the generated documentation is
110 $(AUTODOCDIR):
111         mkdir -p $@
112
113 # print some help
114 .PHONY: help
115 help:
116         @echo "possible targets are:"
117         @echo "[$(targets)]"
118         @echo "but not all of them should be used or make sense"
119
120 # include dependencies
121 include .depend