1 # Hey Emacs, this is a -*- makefile -*-
12 # partial linking of a subdir's $(OFILES) into one file
14 ifeq ($(strip $(OFILES)),)
18 $(LD) $(LDFLAGS) -r -o $@ $^
21 clean: subdir_clean local_clean
24 $(RM) $(OFILES) subdir.o core
26 realclean: subdir_realclean local_clean
27 $(RM) $(GENFILES) .depend TAGS $(TARDIRNAME)
29 depend: subdir_depend local_depend
31 local_depend: $(CFILES) $(filter %.h,$(SOURCES) $(GENFILES))
32 ifeq ($(strip $(CFILES)),)
35 $(CC) -M $(DEFS) $(CPPFLAGS) $(filter %.c,$^) >.depend || { $(RM) .depend; false; }
39 # generate an archive for distribution
41 $(MAKE) -C testprograms dist
43 dist: subdir_dist local_dist $(TARDIRNAME)
44 # @echo create archive with $(DISTFILES)
45 # @echo tar -C $(top_srcdir) -uf libfirm.tar $(ARCHIVEDISTFILES)
46 $(TAR) $(TARFLAGS) $(ARCHIVEDISTFILES)
48 local_dist: $(DISTFILES)
51 $(LN_S) $(top_srcdir) $@
53 # dont know about this
54 # Recurse into $(subdirs) for $(targets)
55 $(addprefix subdir_,$(targets)): $(subdirs)
58 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
60 CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status >&2
63 tags: subdir_tags local_tags
65 local_tags: $(TAGFILES)
69 install: $(INCLUDEDIR) install_headers $(LIBDIR) install_libs
71 install_headers: subdir_install_headers local_install_headers
72 local_install_headers:
73 ifneq ($(strip $(INSTALL_HEADERS)),)
74 $(INSTALL) -m u+rw,a+r $(addprefix $(srcdir)/,$(INSTALL_HEADERS)) $(INCLUDEDIR)
77 install_libs: subdir_install_libs local_install_libs
79 ifneq ($(strip $(INSTALL_LIBS)),)
80 $(INSTALL) -m u+rw,a+r $(addprefix $(topdir)/,$(INSTALL_LIBS)) $(LIBDIR)
90 # generated the directory where all the generated documentation is
97 @echo "possible targets are:"
99 @echo "but not all of them should be used or make sense"
101 # include dependencies