Added flag "peculiarity" to entity.h, type.h.
[libfirm] / MakeTargets
1 # Hey Emacs, this is a -*- makefile -*-
2 #
3 # libFIRM Project
4 #
5 # $Id$
6 #
7
8 .PHONY: subdir_all
9
10 all : subdir_all
11
12 # partial linking of a subdir's $(OFILES) into one file
13 subdir.o: $(OFILES)
14 ifeq ($(strip $(OFILES)),)
15         >$@
16 else
17         rm -f $@
18         $(LD) $(LDFLAGS) -r -o $@ $^
19 endif
20
21 clean: subdir_clean local_clean
22 .PHONY: local_clean
23 local_clean:
24         $(RM) $(OFILES) subdir.o core
25
26 realclean: subdir_realclean local_clean
27         $(RM) $(GENFILES) .depend TAGS $(TARDIRNAME)
28
29 depend: subdir_depend local_depend
30 .PHONY: local_depend
31 local_depend: $(CFILES) $(filter %.h,$(SOURCES) $(GENFILES))
32 ifeq ($(strip $(CFILES)),)
33         >.depend
34 else
35         $(CC) -M $(DEFS) $(CPPFLAGS) $(filter %.c,$^) >.depend || { $(RM) .depend; false; }
36 endif
37
38 autodoc_xref: subdir_autodoc_xref local_autodoc_xref
39 .PHONY: local_autodoc_xref
40 local_autodoc_xref: $(LOCALXREFSFILE)
41
42 autodoc_html: subdir_autodoc_html local_autodoc_html
43 .PHONY: local_autodoc_html
44 local_autodoc_html: $(HTMLFILES)
45
46
47 # generate an archive for distribution
48 distrib: dist
49         $(MAKE) -C testprograms dist
50
51 dist:   subdir_dist local_dist $(TARDIRNAME)
52 #       @echo create archive with $(DISTFILES)
53 #       @echo tar -C $(top_srcdir) -uf libfirm.tar $(ARCHIVEDISTFILES)
54         $(TAR) $(TARFLAGS) $(ARCHIVEDISTFILES)
55 .PHONY: local_dist
56 local_dist:     $(DISTFILES)
57
58 $(TARDIRNAME):
59         $(LN_S) $(top_srcdir) $@
60
61 # dont know about this
62 # Recurse into $(subdirs) for $(targets)
63 $(addprefix subdir_,$(targets)): $(subdirs)
64         +$(recurse)
65
66 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
67         cd $(topdir) && \
68         CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status >&2
69
70 # generate TAGS
71 tags:   subdir_tags local_tags
72 .PHONY: local_tags
73 local_tags:     $(TAGFILES)
74         etags -C $^
75
76 # installation
77 install:        $(INCLUDEDIR) install_headers $(LIBDIR) install_libs
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
85 install_libs:           subdir_install_libs local_install_libs
86 local_install_libs:
87 ifneq ($(strip $(INSTALL_LIBS)),)
88         $(INSTALL) -m u+rw,a+r $(addprefix $(topdir)/,$(INSTALL_LIBS)) $(LIBDIR)
89 endif
90
91
92 $(LIBDIR):      $(LIBDIR)
93         mkdir -p $@
94
95 $(INCLUDEDIR):  $(INCLUDEDIR)
96         mkdir -p $@
97
98 # generated the directory where all the generated documentation is
99 $(AUTODOCDIR):
100         mkdir $@
101
102 # print some help
103 .PHONY: help
104 help:
105         @echo "possible targets are:"
106         @echo "[$(targets)]"
107         @echo "but not all of them should be used or make sense"
108
109 # include dependencies
110 -include .depend