diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2005-02-18 13:47:17 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2005-02-18 13:47:17 +0000 |
| commit | cdde25b597eb4047e9db27bb8bbcf938e4a43cfe (patch) | |
| tree | d25f47817cc8515228c8ea0eb33ab71bfc2159d4 /firmware | |
| parent | f436476f9f0eeae4640197866ea5b5fa068df7e9 (diff) | |
| download | rockbox-cdde25b597eb4047e9db27bb8bbcf938e4a43cfe.zip rockbox-cdde25b597eb4047e9db27bb8bbcf938e4a43cfe.tar.gz rockbox-cdde25b597eb4047e9db27bb8bbcf938e4a43cfe.tar.bz2 rockbox-cdde25b597eb4047e9db27bb8bbcf938e4a43cfe.tar.xz | |
Unified build system to use SOURCES for sim builds too, a single Makefile-look
made by configure and various related adjustments. This has not yet been tested
on cygwin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6001 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
| -rw-r--r-- | firmware/Makefile | 3 | ||||
| -rw-r--r-- | firmware/SOURCES | 48 | ||||
| -rw-r--r-- | firmware/common/timefuncs.c | 1 | ||||
| -rw-r--r-- | firmware/debug.c | 1 | ||||
| -rw-r--r-- | firmware/include/dir.h | 4 | ||||
| -rw-r--r-- | firmware/include/stdio.h | 9 | ||||
| -rw-r--r-- | firmware/include/time.h | 11 | ||||
| -rw-r--r-- | firmware/mpeg.c | 7 |
8 files changed, 60 insertions, 24 deletions
diff --git a/firmware/Makefile b/firmware/Makefile index 966d9e0..618a770 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -11,7 +11,7 @@ INCLUDES=-Iinclude -I$(FIRMDIR) -Iexport -Icommon -Idrivers CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} -SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P -include "config.h" - ) +SRC := $(shell cat SOURCES | gcc -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - ) SOURCES = $(SRC) OBJS2 := $(patsubst %.c, $(OBJDIR)/%.o, $(SRC)) $(OBJDIR)/sysfont.o OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) @@ -29,6 +29,7 @@ $(TOOLSDIR)/convbdf: $(OUTPUT): $(OBJS) $(DEPFILE) @echo "AR $@" @$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 + @$(RANLIB) $@ include $(TOOLSDIR)/make.inc diff --git a/firmware/SOURCES b/firmware/SOURCES index 535b221..a5e95e7 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -1,11 +1,15 @@ +#ifndef SIMULATOR backlight.c +#endif buffer.c common/atoi.c common/ctype.c +#ifndef SIMULATOR common/dir.c +common/file.c +#endif common/disk.c common/errno.c -common/file.c common/memcmp.c common/qsort.c common/random.c @@ -16,7 +20,7 @@ common/strcat.c common/strchr.c common/strcmp.c common/strcpy.c -#if CONFIG_CPU == SH7034 +#if (CONFIG_CPU == SH7034) && !defined(SIMULATOR) common/strlen_a.S #else common/strlen.c @@ -33,7 +37,20 @@ common/memset_a.S common/memcpy.c common/memset.c #endif -debug.c +#ifdef HAVE_LCD_CHARCELLS +drivers/lcd-player-charset.c +drivers/lcd-player.c +#endif +#ifdef HAVE_LCD_BITMAP +#if CONFIG_LCD == LCD_S1D15E06 +drivers/lcd-h100.c +#else +drivers/lcd-recorder.c +#endif +#endif +drivers/power.c +drivers/led.c +#ifndef SIMULATOR drivers/adc.c #ifdef HAVE_MMC drivers/ata_mmc.c @@ -54,42 +71,35 @@ tuner_philips.c #endif #endif drivers/i2c.c -#ifdef HAVE_LCD_CHARCELLS -drivers/lcd-player-charset.c -drivers/lcd-player.c -#endif -#ifdef HAVE_LCD_BITMAP -#if CONFIG_LCD == LCD_S1D15E06 -drivers/lcd-h100.c -#else -drivers/lcd-recorder.c -#endif -#endif -drivers/led.c #if CONFIG_HWCODEC != MASNONE drivers/mas.c #endif -drivers/power.c #ifdef HAVE_RTC drivers/rtc.c #endif drivers/serial.c +#endif /* !SIMULATOR */ #ifdef HAVE_LCD_BITMAP font.c #endif hwcompat.c id3.c +#ifndef SIMULATOR kernel.c +rolo.c +thread.c +crt0.S +#endif mp3_playback.c mp3data.c mpeg.c +#ifndef WIN32 /* the win32 sim has its own versin of these: */ panic.c +debug.c +#endif powermgmt.c -rolo.c system.c -thread.c usb.c -crt0.S #if CONFIG_CPU == SH7034 bitswap.S descramble.S diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c index 1e95733..1a256cc 100644 --- a/firmware/common/timefuncs.c +++ b/firmware/common/timefuncs.c @@ -17,6 +17,7 @@ * ****************************************************************************/ +#include <stdio.h> /* get NULL */ #include "config.h" #include "rtc.h" diff --git a/firmware/debug.c b/firmware/debug.c index 5cc032b..0989e80 100644 --- a/firmware/debug.c +++ b/firmware/debug.c @@ -222,6 +222,7 @@ void debugf(const char *fmt, ...) void debug_init(void) { } +extern void *stderr; void debugf(const char *fmt, ...) { diff --git a/firmware/include/dir.h b/firmware/include/dir.h index 8dcbb8e..12ec724 100644 --- a/firmware/include/dir.h +++ b/firmware/include/dir.h @@ -22,8 +22,6 @@ #include <stdbool.h> #include <file.h> -#ifndef DIRENT_DEFINED - #define ATTR_READ_ONLY 0x01 #define ATTR_HIDDEN 0x02 #define ATTR_SYSTEM 0x04 @@ -32,6 +30,8 @@ #define ATTR_ARCHIVE 0x20 #define ATTR_VOLUME 0x40 /* this is a volume, not a real directory */ +#ifndef DIRENT_DEFINED + struct dirent { unsigned char d_name[MAX_PATH]; int attribute; diff --git a/firmware/include/stdio.h b/firmware/include/stdio.h index b98f01c..968bd59 100644 --- a/firmware/include/stdio.h +++ b/firmware/include/stdio.h @@ -36,4 +36,13 @@ int snprintf (char *buf, size_t size, const char *fmt, ...); int vsnprintf (char *buf, int size, const char *fmt, __VALIST ap); +#ifdef SIMULATOR +typedef void FILE; +int vfprintf(FILE *stream, const char *format, __VALIST ap); +#ifdef WIN32 +#define FILENAME_MAX 260 /* ugly hard-coded value of a limit that is set + in file.h */ +#endif +#endif + #endif /* _STDIO_H_ */ diff --git a/firmware/include/time.h b/firmware/include/time.h index 5213468..267face 100644 --- a/firmware/include/time.h +++ b/firmware/include/time.h @@ -20,5 +20,16 @@ struct tm int tm_isdst; }; +#if defined(SIMULATOR) && !defined(_TIME_T_DEFINED) +/* for non-win32 simulators */ +typedef long time_t; + +/* this define below is used by the mingw headers to prevent duplicate + typedefs */ +#define _TIME_T_DEFINED +time_t time(time_t *t); + +#endif + #endif /* _TIME_H_ */ diff --git a/firmware/mpeg.c b/firmware/mpeg.c index e9ddb18..8673da9 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -2485,9 +2485,12 @@ unsigned long mpeg_num_recorded_bytes(void) return 0; } -#elif CONFIG_HWCODEC == MASNONE +#elif (CONFIG_HWCODEC == MASNONE) || defined(SIMULATOR) -/* dummies coming up */ +/* dummies coming up + +NOTE: when we implment these functions for real for software coded targets, +these dummies shall remain for the simulator */ void bitswap(unsigned char *data, int length) { |