Give pitch_detector the IRAMming it deserves.
[kugel-rb.git] / tools / database / database.make
blob54913d8d4a0d01779b09910aebe832dc4d00ffd7
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id: checkwps.make 22680 2009-09-11 17:58:17Z gevaerts $
10 DBDEFINES=-g -DDEBUG -D__PCTOOL__ -DSIMULATOR
11 CFLAGS+=$(DBDEFINES)
13 createsrc = $(shell cat $(1) > $(3); echo "\#if CONFIG_CODEC == SWCODEC" >> $(3); \
14 echo $(2) | sed 's/ /\n/g' >> $(3); \
15 echo "\#endif" >> $(3); \
16 echo $(3))
18 METADATAS := $(subst $(ROOTDIR), ../.., $(wildcard $(ROOTDIR)/apps/metadata/*.c))
20 SRCFILE := $(call createsrc, $(TOOLSDIR)/database/SOURCES, \
21 $(METADATAS), \
22 $(TOOLSDIR)/database/SOURCES.build)
24 SRC= $(call preprocess, $(SRCFILE))
26 FIRMINC = -I$(ROOTDIR)/firmware/include -fno-builtin
28 INCLUDES = -I$(ROOTDIR)/apps/gui \
29 -I$(ROOTDIR)/firmware/export \
30 -I$(ROOTDIR)/apps \
31 -I$(ROOTDIR)/apps/recorder \
32 -I$(APPSDIR) \
33 -I$(BUILDDIR) \
35 SIMINCLUDES += -I$(ROOTDIR)/uisimulator/sdl -I$(ROOTDIR)/uisimulator/common \
36 -I$(FIRMDIR)/export $(TARGET_INC) -I$(BUILDDIR) -I$(APPSDIR)
38 # Makes mkdepfile happy
39 GCCOPTS+=`$(SDLCONFIG) --cflags`
40 OLDGCCOPTS:=$(GCCOPTS)
41 GCCOPTS+=-D__PCTOOL__ $(FIRMINC) $(SIMINCLUDES)
43 LIBS=`$(SDLCONFIG) --libs` -lc
44 ifneq ($(findstring MINGW,$(shell uname)),MINGW)
45 LIBS += -ldl
46 endif
48 .SECONDEXPANSION: # $$(OBJ) is not populated until after this
50 SIMFLAGS += $(SIMINCLUDES) $(DBDEFINES) -DHAVE_CONFIG_H $(OLDGCCOPTS) $(INCLUDES)
52 $(BUILDDIR)/$(BINARY): $$(OBJ)
53 @echo LD $(BINARY)
54 $(SILENT)$(HOSTCC) $(SIMFLAGS) $(LIBS) -o $@ $+
56 $(BUILDDIR)/tools/database/../../uisimulator/%.o: $(ROOTDIR)/uisimulator/%.c
57 $(SILENT)mkdir -p $(dir $@)
58 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SIMFLAGS) -c $< -o $@
60 $(BUILDDIR)/tools/database/database.o: $(APPSDIR)/database.c
61 $(SILENT)mkdir -p $(dir $@)
62 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SIMFLAGS) -c $< -o $@