1 # Hey Emacs, this is a -*- makefile -*-
12 CPPFLAGS := -I. -I$(topdir) -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@
15 INCLUDEDIR = @includedir@
22 LD_R := @libfirm_cv_prog_ld_r@
25 ifeq (@enable_profile_libfirm@,yes)
34 DISTFILES = $(SOURCES)
35 CFILES = $(filter %.c,$(SOURCES) $(GENFILES))
36 HFILES = $(filter %.h,$(SOURCES) $(GENFILES))
37 OFILES = $(CFILES:.c=.o)
39 TAGFILES = $(CFILES) $(HFILES)
41 LDLIBS=$(LIBS) -lm -lc
43 COMPILE.c = $(CC) -c $(DEFS) $(CPPFLAGS) $(CDEBUG) $(CFLAGS) $(XCFLAGS)
44 COMPILE.s = $(CC) -S $(DEFS) $(CPPFLAGS) $(CDEBUG) $(CFLAGS) $(XCFLAGS)
53 $(CPP) $(DEFS) $(CPPFLAGS) -o $@ $<
56 $(DT) $(DTFLAGS) <$^ >$@ || $(fail)
63 # make target given by $@ recursively in $^ ...
64 ifeq (,$(findstring k,$(MAKEFLAGS)))
65 # ... and immediately stop on errors
67 +@for i in $^ ""; do if test $$i; then $(MAKE) -C $$i $(subst subdir_,,$@) || exit $$?; fi; done
70 # ... and keep going after errors
73 for i in $^ ""; do if test $$i; then $(MAKE) -C $$i $(subst subdir_,,$@) || fail=y; fi; done; \
78 targets = all clean depend echodist echogen echosrc realclean tags install