blob: c29dd47f9b8e2fa288ed33733a089e97b8e32348 [file] [log] [blame]
Frank Gevaerts6e115722009-10-07 16:54:15 +00001# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id: checkwps.make 22680 2009-09-11 17:58:17Z gevaerts $
8#
9
Thomas Martitzefe73e12012-07-31 10:33:27 +020010GCCOPTS += -g -DDEBUG -D__PCTOOL__ -DDBTOOL
Frank Gevaerts6e115722009-10-07 16:54:15 +000011
Yoshihisa Uchidaec39c052010-02-25 12:28:30 +000012createsrc = $(shell cat $(1) > $(3); echo "\#if CONFIG_CODEC == SWCODEC" >> $(3); \
13 echo $(2) | sed 's/ /\n/g' >> $(3); \
14 echo "\#endif" >> $(3); \
15 echo $(3))
16
Vencislav Atanasov7f9fc202019-07-28 19:44:23 +030017METADATAS := $(call full_path_subst,$(ROOTDIR)/%,../../%,$(wildcard $(ROOTDIR)/lib/rbcodec/metadata/*.c))
Yoshihisa Uchidaec39c052010-02-25 12:28:30 +000018
19SRCFILE := $(call createsrc, $(TOOLSDIR)/database/SOURCES, \
20 $(METADATAS), \
21 $(TOOLSDIR)/database/SOURCES.build)
22
Thomas Martitzefe73e12012-07-31 10:33:27 +020023DATABASE_SRC = $(call preprocess, $(SRCFILE))
24DATABASE_OBJ = $(call c2obj,$(DATABASE_SRC))
Frank Gevaerts6e115722009-10-07 16:54:15 +000025
Thomas Martitzefe73e12012-07-31 10:33:27 +020026OTHER_SRC += $(DATABASE_SRC)
Frank Gevaerts6e115722009-10-07 16:54:15 +000027
Thomas Martitzefe73e12012-07-31 10:33:27 +020028INCLUDES += -I$(ROOTDIR)/apps/gui \
Thomas Martitzc245de02014-03-03 19:09:41 +010029 -I$(FIRMDIR)/kernel/include \
Thomas Martitzefe73e12012-07-31 10:33:27 +020030 -I$(ROOTDIR)/firmware/export \
31 -I$(ROOTDIR)/firmware/include \
32 -I$(ROOTDIR)/apps \
33 -I$(ROOTDIR)/apps/recorder \
34 -I$(ROOTDIR)/lib/rbcodec \
35 -I$(ROOTDIR)/lib/rbcodec/metadata \
36 -I$(ROOTDIR)/lib/rbcodec/dsp \
37 -I$(APPSDIR) \
38 -I$(BUILDDIR)
Michael Sevakis95e23de2013-04-16 17:47:58 -040039
40ifdef SOFTWARECODECS
41OTHERLIBS := $(FIXEDPOINTLIB)
42endif
Yoshihisa Uchidaec39c052010-02-25 12:28:30 +000043
Frank Gevaerts6e115722009-10-07 16:54:15 +000044.SECONDEXPANSION: # $$(OBJ) is not populated until after this
45
Michael Sevakis95e23de2013-04-16 17:47:58 -040046$(BUILDDIR)/$(BINARY): $$(DATABASE_OBJ) $(OTHERLIBS)
Thomas Martitzefe73e12012-07-31 10:33:27 +020047 $(call PRINTS,LD $(BINARY))
Michael Sevakis95e23de2013-04-16 17:47:58 -040048 $(SILENT)$(HOSTCC) $(call a2lnk $(OTHERLIBS)) -o $@ $+