# # Project: libFIRM # File name: MakeRules.in # Purpose: # Author: nicht Till Riedel, das waren andere! # Modified by: # Created: # CVS-ID: $Id$ # Copyright: (c) 2002-2003 Universität Karlsruhe # Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. # VPATH = $(srcdir) LIBFIRM_VERSION = @PACKAGE_VERSION@ CC = @CC@ CFLAGS := -Wall -Wstrict-prototypes @CFLAGS@ CPPFLAGS := -I. -I$(topdir) -I$(top_srcdir)/include/libfirm -I$(top_srcdir)/include/libfirm/adt -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@ @LIBCORE_CFLAGS@ prefix?=@prefix@ exec_prefix?=@exec_prefix@ includedir?=@includedir@ libdir?=@libdir@ INSTALL = @INSTALL@ INCLUDEDIR ?= ${includedir}/${PACKAGE_NAME} LIBDIR ?= ${libdir} PACKAGE_NAME = @PACKAGE_NAME@ INCLUDEDIR ?= ${includedir}/${PACKAGE_NAME} LIBDIR ?= ${libdir} DEFS = @DEFS@ LD := @LD@ LDFLAGS := @LDFLAGS@ LD_R := @libfirm_cv_prog_ld_r@ LN_S := @LN_S@ # profiling enabled? ifeq (@enable_profile_libfirm@,yes) LDFLAGS += # -g -pg GL: geht bei mir nicht: unrecognised option CFLAGS += -g -pg endif AR := @AR@ ARFLAGS := rc TAR := @TAR@ TARDIRNAME := libfirm-$(LIBFIRM_VERSION) TARFILENAME := $(topdir)/$(TARDIRNAME).tar TARFLAGS = -uhf $(TARFILENAME) RANLIB := @RANLIB@ AUTODOC := @DOXYGEN@ AUTODOCFILE := libfirm.doxygen AUTODOCDIR := doc/html AUTODOCINDEXFILE := $(AUTODOCDIR)/index.html DISTFILES += $(addprefix $(srcdir)/, $(SOURCES)) ARCHIVEDISTFILES += $(addprefix $(TARDIRNAME)/$(subdir)/, $(SOURCES)) CFILES = $(filter %.c,$(SOURCES) $(GENFILES)) HFILES = $(filter %.h,$(SOURCES) $(GENFILES)) OFILES = $(CFILES:.c=.o) TAGFILES = $(CFILES) $(HFILES) LDLIBS=$(LIBS) -lm -lc COMPILE.c = $(CC) -c $(DEFS) $(CPPFLAGS) $(CDEBUG) $(CFLAGS) $(XCFLAGS) COMPILE.s = $(CC) -S $(DEFS) $(CPPFLAGS) $(CDEBUG) $(CFLAGS) $(XCFLAGS) %.o: %.c $(COMPILE.c) -o $@ $< %.s: %.c $(COMPILE.s) -o $@ $< %.i: %.c $(CPP) $(DEFS) $(CPPFLAGS) -o $@ $< %.c: %.dot $(DT) $(DTFLAGS) <$^ >$@ || $(fail) define fail { $(RM) $@; false; } endef # make target given by $@ recursively in $^ ... ifeq (,$(findstring k,$(MAKEFLAGS))) # ... and immediately stop on errors define recurse +@for i in $^ ""; do if test $$i; then $(MAKE) -C $$i $(subst subdir_,,$@) || exit $$?; fi; done endef else # ... and keep going after errors define recurse +@fail=; \ for i in $^ ""; do if test $$i; then $(MAKE) -C $$i $(subst subdir_,,$@) || fail=y; fi; done; \ test -z "$$fail" endef endif targets = all clean depend realclean tags install autodoc dist distrib install_headers install_libs