Newer
Older
# Most of this is so that you can do
# $ make all
# and kick off a recursive make
# Also, "make src/all" turns into "make -C src all"
SUBDIRS = src examples src/bindings/jni
nojni: all
nojni: SUBDIRS:=$(filter-out jni,$(SUBDIRS))
all clean:
test: src/test_suite
$<
examples/all: src/all
examples/compile: src/compile
$(1)/%: force
$(MAKE) -C $(1) $$*
force:
$(foreach dir,$(SUBDIRS),$(eval $(call SUBDIR_TEMPLATE,$(dir))))
#.DEFAULT:
# $(if $(findstring ./,$(dir $@)),$(error No rule to make target `$@'),$(MAKE) -C $(dir $@) $(notdir $@))
TAGS: force
etags $(shell find * -name "*.c" -o -name "*.h")
config:
@printf "%30s %s\n" $(foreach var,$(CONFIG_VARS),$(var) $($(var)) )