Frank Gevaerts | 6e11572 | 2009-10-07 16:54:15 +0000 | [diff] [blame] | 1 | # __________ __ ___. |
| 2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 6 | # \/ \/ \/ \/ \/ |
| 7 | # $Id: checkwps.make 22680 2009-09-11 17:58:17Z gevaerts $ |
| 8 | # |
| 9 | |
Thomas Martitz | efe73e1 | 2012-07-31 10:33:27 +0200 | [diff] [blame] | 10 | GCCOPTS += -g -DDEBUG -D__PCTOOL__ -DDBTOOL |
Frank Gevaerts | 6e11572 | 2009-10-07 16:54:15 +0000 | [diff] [blame] | 11 | |
Yoshihisa Uchida | ec39c05 | 2010-02-25 12:28:30 +0000 | [diff] [blame] | 12 | createsrc = $(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 Atanasov | 7f9fc20 | 2019-07-28 19:44:23 +0300 | [diff] [blame^] | 17 | METADATAS := $(call full_path_subst,$(ROOTDIR)/%,../../%,$(wildcard $(ROOTDIR)/lib/rbcodec/metadata/*.c)) |
Yoshihisa Uchida | ec39c05 | 2010-02-25 12:28:30 +0000 | [diff] [blame] | 18 | |
| 19 | SRCFILE := $(call createsrc, $(TOOLSDIR)/database/SOURCES, \ |
| 20 | $(METADATAS), \ |
| 21 | $(TOOLSDIR)/database/SOURCES.build) |
| 22 | |
Thomas Martitz | efe73e1 | 2012-07-31 10:33:27 +0200 | [diff] [blame] | 23 | DATABASE_SRC = $(call preprocess, $(SRCFILE)) |
| 24 | DATABASE_OBJ = $(call c2obj,$(DATABASE_SRC)) |
Frank Gevaerts | 6e11572 | 2009-10-07 16:54:15 +0000 | [diff] [blame] | 25 | |
Thomas Martitz | efe73e1 | 2012-07-31 10:33:27 +0200 | [diff] [blame] | 26 | OTHER_SRC += $(DATABASE_SRC) |
Frank Gevaerts | 6e11572 | 2009-10-07 16:54:15 +0000 | [diff] [blame] | 27 | |
Thomas Martitz | efe73e1 | 2012-07-31 10:33:27 +0200 | [diff] [blame] | 28 | INCLUDES += -I$(ROOTDIR)/apps/gui \ |
Thomas Martitz | c245de0 | 2014-03-03 19:09:41 +0100 | [diff] [blame] | 29 | -I$(FIRMDIR)/kernel/include \ |
Thomas Martitz | efe73e1 | 2012-07-31 10:33:27 +0200 | [diff] [blame] | 30 | -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 Sevakis | 95e23de | 2013-04-16 17:47:58 -0400 | [diff] [blame] | 39 | |
| 40 | ifdef SOFTWARECODECS |
| 41 | OTHERLIBS := $(FIXEDPOINTLIB) |
| 42 | endif |
Yoshihisa Uchida | ec39c05 | 2010-02-25 12:28:30 +0000 | [diff] [blame] | 43 | |
Frank Gevaerts | 6e11572 | 2009-10-07 16:54:15 +0000 | [diff] [blame] | 44 | .SECONDEXPANSION: # $$(OBJ) is not populated until after this |
| 45 | |
Michael Sevakis | 95e23de | 2013-04-16 17:47:58 -0400 | [diff] [blame] | 46 | $(BUILDDIR)/$(BINARY): $$(DATABASE_OBJ) $(OTHERLIBS) |
Thomas Martitz | efe73e1 | 2012-07-31 10:33:27 +0200 | [diff] [blame] | 47 | $(call PRINTS,LD $(BINARY)) |
Michael Sevakis | 95e23de | 2013-04-16 17:47:58 -0400 | [diff] [blame] | 48 | $(SILENT)$(HOSTCC) $(call a2lnk $(OTHERLIBS)) -o $@ $+ |