test for robodoc in configure if enabled with --enable-autodoc
[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         rm -f $@
15         $(LD) $(LDFLAGS) -r -o $@ $^
16
17 clean: subdir_clean local_clean
18 .PHONY: local_clean
19 local_clean:
20         $(RM) $(OFILES) subdir.o core
21
22 realclean: subdir_realclean local_clean
23         $(RM) $(GENFILES) .depend TAGS
24
25 depend: subdir_depend local_depend
26 .PHONY: local_depend
27 local_depend: $(CFILES) $(filter %.h,$(SOURCES) $(GENFILES))
28 ifeq ($(strip $(CFILES)),)
29         >.depend
30 else
31         $(CC) -M $(DEFS) $(CPPFLAGS) $(filter %.c,$^) >.depend || { $(RM) .depend; false; }
32 endif
33
34 autodoc_xref: subdir_autodoc_xref local_autodoc_xref
35 .PHONY: local_autodoc_xref
36 local_autodoc_xref: $(LOCALXREFSFILE)
37
38 autodoc_html: subdir_autodoc_html local_autodoc_html
39 .PHONY: local_autodoc_html
40 local_autodoc_html: $(HTMLFILES)
41
42
43 # Recurse into $(subdirs) for $(targets)
44 $(addprefix subdir_,$(targets)): $(subdirs)
45         +$(recurse)
46
47 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
48         cd $(topdir) && \
49         CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status >&2
50
51 # generate TAGS
52 tags:   subdir_tags local_tags
53 .PHONY: local_tags
54 local_tags:     $(TAGFILES)
55         etags -C $^
56
57 # installation
58 install:        subdir_install local_install
59 local_install: $(INCLUDEDIR) $(LIBDIR)
60 ifneq ($(strip $(INSTALL_HEADERS)),)
61         $(INSTALL) -m u+rw,a+r $(addprefix $(srcdir)/,$(INSTALL_HEADERS)) $(INCLUDEDIR)
62 endif
63 ifneq ($(strip $(INSTALL_LIBS)),)
64         $(INSTALL) -m u+rw,a+r $(addprefix $(topdir)/,$(INSTALL_LIBS)) $(LIBDIR)
65 endif
66
67 $(LIBDIR):      $(LIBDIR)
68         mkdir -p $@
69
70 $(INCLUDEDIR):  $(INCLUDEDIR)
71         mkdir -p $@
72
73 # include dependencies
74 -include .depend