# Hey Emacs, this is a -*- makefile -*- # # libFIRM Project # # $Id$ # .PHONY: subdir_all all : subdir_all # partial linking of a subdir's $(OFILES) into one file subdir.o: $(OFILES) ifeq ($(strip $(OFILES)),) >$@ else rm -f $@ $(LD) $(LDFLAGS) -r -o $@ $^ endif clean: subdir_clean local_clean .PHONY: local_clean local_clean: $(RM) $(OFILES) subdir.o core realclean: subdir_realclean local_clean $(RM) $(GENFILES) .depend TAGS $(TARDIRNAME) depend: subdir_depend local_depend .PHONY: local_depend local_depend: $(CFILES) $(filter %.h,$(SOURCES) $(GENFILES)) ifeq ($(strip $(CFILES)),) >.depend else $(CC) -M $(DEFS) $(CPPFLAGS) $(filter %.c,$^) >.depend || { $(RM) .depend; false; } endif # generate an archive for distribution distrib: dist $(MAKE) -C testprograms dist dist: subdir_dist local_dist $(TARDIRNAME) # @echo create archive with $(DISTFILES) # @echo tar -C $(top_srcdir) -uf libfirm.tar $(ARCHIVEDISTFILES) $(TAR) $(TARFLAGS) $(ARCHIVEDISTFILES) .PHONY: local_dist local_dist: $(DISTFILES) $(TARDIRNAME): $(LN_S) $(top_srcdir) $@ # dont know about this # Recurse into $(subdirs) for $(targets) $(addprefix subdir_,$(targets)): $(subdirs) +$(recurse) Makefile: $(srcdir)/Makefile.in $(topdir)/config.status cd $(topdir) && \ CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status >&2 # generate TAGS tags: subdir_tags local_tags .PHONY: local_tags local_tags: $(TAGFILES) etags -C $^ # installation install: $(INCLUDEDIR) install_headers $(LIBDIR) install_libs install_headers: subdir_install_headers local_install_headers local_install_headers: ifneq ($(strip $(INSTALL_HEADERS)),) $(INSTALL) -m u+rw,a+r $(addprefix $(srcdir)/,$(INSTALL_HEADERS)) $(INCLUDEDIR) endif install_libs: subdir_install_libs local_install_libs local_install_libs: ifneq ($(strip $(INSTALL_LIBS)),) $(INSTALL) -m u+rw,a+r $(addprefix $(topdir)/,$(INSTALL_LIBS)) $(LIBDIR) endif $(LIBDIR): mkdir -p $@ $(INCLUDEDIR): mkdir -p $@ # generated the directory where all the generated documentation is $(AUTODOCDIR): mkdir -p $@ # print some help .PHONY: help help: @echo "possible targets are:" @echo "[$(targets)]" @echo "but not all of them should be used or make sense" # include dependencies -include .depend