Use TIME_BEFORE() and redo a macro slightly.
[kugel-rb.git] / apps / apps.make
blob5eb5f6c70a9615b5a86916083a3f9a3822ae0de8
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 INCLUDES += -I$(APPSDIR) $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
11 SRC += $(call preprocess, $(APPSDIR)/SOURCES)
13 # apps/features.txt is a file that (is preprocessed and) lists named features
14 # based on defines in the config-*.h files. The named features will be passed
15 # to genlang and thus (translated) phrases can be used based on those names.
16 # button.h is included for the HAS_BUTTON_HOLD define.
18 # Kludge: depends on errno.o only to depend on config-*.h ...
20 features $(BUILDDIR)/apps/features $(BUILDDIR)/apps/genlang-features: $(APPSDIR)/features.txt $(BUILDDIR)/firmware/common/errno.o
21 $(SILENT)mkdir -p $(BUILDDIR)/apps
22 $(SILENT)mkdir -p $(BUILDDIR)/lang
23 $(call PRINTS,PP $(<F))
24 $(SILENT)$(CC) $(PPCFLAGS) \
25 -E -P -imacros "config.h" -imacros "button.h" -x c $< | \
26 grep -v "^\#" | grep -v "^$$" > $(BUILDDIR)/apps/features; \
27 for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done ; \
28 echo "$$feat" >$(BUILDDIR)/apps/genlang-features
30 ASMDEFS_SRC += $(APPSDIR)/core_asmdefs.c