summaryrefslogtreecommitdiffstats
path: root/tools/database
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2009-10-07 16:54:15 +0000
committerFrank Gevaerts <frank@gevaerts.be>2009-10-07 16:54:15 +0000
commit6e11572e0788136f77ef67b3cfc182095084da4b (patch)
tree68539f3fdb8055807587b733d43cb38bb1ef7e19 /tools/database
parent9e9a9138296c602370e9c92d5fbd84a261aa17b8 (diff)
downloadrockbox-6e11572e0788136f77ef67b3cfc182095084da4b.tar.gz
rockbox-6e11572e0788136f77ef67b3cfc182095084da4b.tar.bz2
rockbox-6e11572e0788136f77ef67b3cfc182095084da4b.zip
Make the database tool buildable from configure.
Also update the checkwps makefile to make checkwps builds not break git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22998 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/database')
-rw-r--r--tools/database/SOURCES37
-rw-r--r--tools/database/database.c1
-rw-r--r--tools/database/database.make42
3 files changed, 80 insertions, 0 deletions
diff --git a/tools/database/SOURCES b/tools/database/SOURCES
new file mode 100644
index 0000000000..60a70755c4
--- /dev/null
+++ b/tools/database/SOURCES
@@ -0,0 +1,37 @@
+database.c
+../../apps/fixedpoint.c
+../../apps/metadata.c
+../../apps/metadata/mp3.c
+#if CONFIG_CODEC == SWCODEC
+../../apps/metadata/metadata_common.c
+../../apps/metadata/aiff.c
+../../apps/metadata/ape.c
+../../apps/metadata/asf.c
+../../apps/metadata/adx.c
+../../apps/metadata/flac.c
+../../apps/metadata/monkeys.c
+../../apps/metadata/mp4.c
+../../apps/metadata/mpc.c
+../../apps/metadata/ogg.c
+../../apps/metadata/sid.c
+../../apps/metadata/mod.c
+../../apps/metadata/spc.c
+../../apps/metadata/vorbis.c
+../../apps/metadata/wave.c
+../../apps/metadata/wavpack.c
+../../apps/metadata/a52.c
+../../apps/metadata/asap.c
+../../apps/metadata/rm.c
+../../apps/metadata/nsf.c
+../../apps/replaygain.c
+#endif
+../../apps/misc.c
+../../apps/mp3data.c
+../../apps/tagcache.c
+../../firmware/common/crc32.c
+../../firmware/common/ctype.c
+../../firmware/common/strlcpy.c
+../../firmware/common/structec.c
+../../firmware/common/unicode.c
+../../firmware/logf.c
+../../uisimulator/common/io.c
diff --git a/tools/database/database.c b/tools/database/database.c
index 1f398c02f0..41e73ae4a3 100644
--- a/tools/database/database.c
+++ b/tools/database/database.c
@@ -1,5 +1,6 @@
/* A _very_ skeleton file to demonstrate building tagcache db on host. */
+#include <stdbool.h>
#include <stdio.h>
#include <sys/stat.h>
#include "tagcache.h"
diff --git a/tools/database/database.make b/tools/database/database.make
new file mode 100644
index 0000000000..482b3dfa2a
--- /dev/null
+++ b/tools/database/database.make
@@ -0,0 +1,42 @@
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
+# $Id: checkwps.make 22680 2009-09-11 17:58:17Z gevaerts $
+#
+
+FIRMINC = -I../../firmware/include -fno-builtin
+
+DBDEFINES=-g -DDEBUG -D__PCTOOL__ -DSIMULATOR
+CFLAGS+=$(DBDEFINES)
+
+SRC= $(call preprocess, $(TOOLSDIR)/database/SOURCES)
+
+FIRMINC = -I$(ROOTDIR)/firmware/include -fno-builtin
+
+INCLUDES = -I$(ROOTDIR)/apps/gui \
+ -I$(ROOTDIR)/firmware/export \
+ -I$(ROOTDIR)/apps \
+ -I$(APPSDIR) \
+ -I$(BUILDDIR) \
+
+SIMINCLUDES += -I$(ROOTDIR)/uisimulator/sdl -I$(ROOTDIR)/uisimulator/common \
+ -I$(FIRMDIR)/export $(TARGET_INC) -I$(BUILDDIR) -I$(APPSDIR) -I/usr/include/SDL
+
+# Makes mkdepfile happy
+OLDGCCOPTS:=$(GCCOPTS)
+GCCOPTS+=-D__PCTOOL__ $(FIRMINC) $(SIMINCLUDES)
+
+.SECONDEXPANSION: # $$(OBJ) is not populated until after this
+
+$(BUILDDIR)/$(BINARY): $$(OBJ)
+ @echo LD $(BINARY)
+ $(SILENT)$(HOSTCC) $(INCLUDE) $(FLAGS) -ldl -o $@ $+
+
+SIMFLAGS += $(SIMINCLUDES) $(DBDEFINES) -DHAVE_CONFIG_H $(OLDGCCOPTS)
+
+$(BUILDDIR)/tools/database/../../uisimulator/%.o: $(ROOTDIR)/uisimulator/%.c
+ $(SILENT)mkdir -p $(dir $@)
+ $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SIMFLAGS) -c $< -o $@