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
This commit is contained in:
Frank Gevaerts 2009-10-07 16:54:15 +00:00
parent 9e9a913829
commit 6e11572e07
9 changed files with 98 additions and 8 deletions

View file

@ -22,9 +22,7 @@
#ifndef __CONFIG_H__
#define __CONFIG_H__
#ifndef __PCTOOL__
#include "autoconf.h"
#endif
/* symbolic names for multiple choice configurations: */
@ -620,7 +618,7 @@ Lyre prototype 1*/
/* Enable the directory cache and tagcache in RAM if we have
* plenty of RAM. Both features can be enabled independently. */
#if ((defined(MEMORYSIZE) && (MEMORYSIZE >= 8)) || MEM >= 8) && \
!defined(BOOTLOADER)
!defined(BOOTLOADER) && !defined(__PCTOOL__)
#define HAVE_DIRCACHE
#ifdef HAVE_TAGCACHE
#define HAVE_TC_RAMCACHE

View file

@ -2,7 +2,7 @@
non-reentrant. Instead, its address is returned by the function
__errno. */
#if defined(SIMULATOR) && !defined(__MINGW32__) && !defined(__CYGWIN__)
#if (defined(SIMULATOR)||defined(__PCTOOL__)) && !defined(__MINGW32__) && !defined(__CYGWIN__)
#include "/usr/include/errno.h" /* use the host system implementation */

View file

@ -28,9 +28,7 @@
#ifndef _RBUNICODE_H_
#define _RBUNICODE_H_
#ifndef __PCTOOL__
#include "config.h"
#endif
#define MASK 0xC0 /* 11000000 */
#define COMP 0x80 /* 10x */

View file

@ -16,7 +16,8 @@ INCLUDES = -I$(ROOTDIR)/apps/gui \
-I$(ROOTDIR)/firmware/export \
-I$(ROOTDIR)/apps \
-I$(ROOTDIR)/apps/recorder \
-I$(APPSDIR)
-I$(APPSDIR) \
-I$(BUILDDIR)
# Makes mkdepfile happy
GCCOPTS+=-D__PCTOOL__

13
tools/configure vendored
View file

@ -2451,7 +2451,7 @@ esac
if [ "$ARG_TYPE" ]; then
btype=$ARG_TYPE
else
echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, $gdbstub(M)anual: (Defaults to N)"
echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
btype=`input`;
fi
@ -2543,6 +2543,17 @@ fi
archosrom='';
echo "CheckWPS build selected"
;;
[Dd])
uname=`uname`
simcc "database"
toolset='';
t_cpu='';
GCCOPTS='';
appsdir='\$(ROOTDIR)/tools/database';
output='database.'${modelname};
archosrom='';
echo "Database tool build selected"
;;
*)
if [ "$modelname" = "e200r" ]; then
echo "Do not use the e200R target for regular builds. Use e200 instead."

37
tools/database/SOURCES Normal file
View file

@ -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

View file

@ -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"

View file

@ -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 $@

View file

@ -67,6 +67,8 @@ else ifneq (,$(findstring bootbox,$(APPSDIR)))
include $(APPSDIR)/bootbox.make
else ifneq (,$(findstring checkwps,$(APPSDIR)))
include $(APPSDIR)/checkwps.make
else ifneq (,$(findstring database,$(APPSDIR)))
include $(APPSDIR)/database.make
else
include $(APPSDIR)/apps.make
include $(APPSDIR)/lang/lang.make