summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-05-27 09:41:46 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-05-27 09:41:46 +0000
commit5d236b2bfda7b460e6b970c3b6f6dc539b14020e (patch)
tree27316274323f1de2f7da190f269061d1c4280847
parent6ca9f232a817ed6717354ae68812f67b08cbc2a9 (diff)
downloadrockbox-5d236b2bfda7b460e6b970c3b6f6dc539b14020e.tar.gz
rockbox-5d236b2bfda7b460e6b970c3b6f6dc539b14020e.zip
Generate C file / header for svn version string
It's now easier to force rebuild of files depending on the svn revision version.c/version.h are generated once with new tools/genversion.sh Changes in the VCS are still not auto detected, so you'll have to remove builddir/version.* if you want to change the string in your binaries APPSVERSION is now called RBVERSION and is defined in the generated header instead of being defined by the Makefiles appsversion is now called rbversion (the plugin api number didn't change since old modules are still binary compatible) Change some bootloaders to use knwon-at-buildtime RBVERSION instead of "%s" + rbversion You'll need to run make clean to regenerate dependencies after the removal of apps/version.h To build binaries with a different version string, hand-edit tools/version.sh or tools/genversion.sh (which calls the former) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26320 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/main.c2
-rw-r--r--apps/menus/main_menu.c4
-rw-r--r--apps/misc.c4
-rw-r--r--apps/plugin.c2
-rw-r--r--apps/plugin.h2
-rw-r--r--apps/plugins/battery_bench.c4
-rw-r--r--apps/plugins/iriver_flash.c2
-rw-r--r--apps/plugins/settings_dumper.c2
-rw-r--r--apps/settings.c2
-rw-r--r--apps/version.h26
-rw-r--r--bootloader/Makefile8
-rw-r--r--bootloader/creativezvm.c3
-rw-r--r--bootloader/gigabeat-s.c4
-rw-r--r--bootloader/gigabeat.c5
-rw-r--r--bootloader/iaudio_coldfire.c6
-rw-r--r--bootloader/ipod.c6
-rw-r--r--bootloader/ipodnano2g.c6
-rw-r--r--bootloader/iriver_h1x0.c7
-rw-r--r--bootloader/iriver_h300.c5
-rw-r--r--bootloader/main-e200r-installer.c6
-rw-r--r--bootloader/main-pp.c6
-rw-r--r--bootloader/meizu_m3.c1
-rw-r--r--bootloader/meizu_m6sl.c1
-rw-r--r--bootloader/meizu_m6sp.c1
-rw-r--r--bootloader/mini2440.c3
-rw-r--r--bootloader/mpio_hd200.c5
-rw-r--r--bootloader/mrobe500.c3
-rw-r--r--bootloader/ondavx747.c3
-rw-r--r--bootloader/samsung_yps3.c1
-rw-r--r--bootloader/show_logo.c5
-rw-r--r--bootloader/telechips.c5
-rw-r--r--bootloader/tpj1022.c2
-rw-r--r--docs/PLUGIN_API.new2
-rw-r--r--firmware/firmware.make5
-rw-r--r--flash/bootbox/Makefile2
-rw-r--r--gdb/Makefile2
-rwxr-xr-xtools/configure1
-rwxr-xr-xtools/genversion.sh42
-rw-r--r--tools/root.make3
-rw-r--r--uisimulator/common/Makefile2
40 files changed, 99 insertions, 102 deletions
diff --git a/apps/main.c b/apps/main.c
index e4b9286b4e..e8043a79d4 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -120,8 +120,6 @@
120 120
121/*#define AUTOROCK*/ /* define this to check for "autostart.rock" on boot */ 121/*#define AUTOROCK*/ /* define this to check for "autostart.rock" on boot */
122 122
123const char appsversion[]=APPSVERSION;
124
125static void init(void); 123static void init(void);
126 124
127#ifdef HAVE_SDL 125#ifdef HAVE_SDL
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index 59a72e1ad7..76ceaa483e 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -172,7 +172,7 @@ static const char* info_getname(int selected_item, void *data,
172 { 172 {
173 case INFO_VERSION: 173 case INFO_VERSION:
174 snprintf(buffer, buffer_len, "%s: %s", 174 snprintf(buffer, buffer_len, "%s: %s",
175 str(LANG_VERSION), appsversion); 175 str(LANG_VERSION), rbversion);
176 break; 176 break;
177 177
178 case INFO_BUFFER: /* buffer */ 178 case INFO_BUFFER: /* buffer */
@@ -259,7 +259,7 @@ static int info_speak_item(int selected_item, void * data)
259 { 259 {
260 case INFO_VERSION: /* version */ 260 case INFO_VERSION: /* version */
261 talk_id(LANG_VERSION, false); 261 talk_id(LANG_VERSION, false);
262 talk_spell(appsversion, true); 262 talk_spell(rbversion, true);
263 break; 263 break;
264 264
265 case INFO_BUFFER: /* buffer */ 265 case INFO_BUFFER: /* buffer */
diff --git a/apps/misc.c b/apps/misc.c
index 95c0dd6e34..747abe076b 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -621,7 +621,7 @@ int show_logo( void )
621 char version[32]; 621 char version[32];
622 int font_h, font_w; 622 int font_h, font_w;
623 623
624 snprintf(version, sizeof(version), "Ver. %s", appsversion); 624 snprintf(version, sizeof(version), "Ver. %s", rbversion);
625 625
626 lcd_clear_display(); 626 lcd_clear_display();
627#if defined(SANSA_CLIP) || defined(SANSA_CLIPV2) || defined(SANSA_CLIPPLUS) 627#if defined(SANSA_CLIP) || defined(SANSA_CLIPV2) || defined(SANSA_CLIPPLUS)
@@ -646,7 +646,7 @@ int show_logo( void )
646 lcd_clear_display(); 646 lcd_clear_display();
647 lcd_double_height(true); 647 lcd_double_height(true);
648 lcd_puts(0, 0, rockbox); 648 lcd_puts(0, 0, rockbox);
649 lcd_puts_scroll(0, 1, appsversion); 649 lcd_puts_scroll(0, 1, rbversion);
650#endif 650#endif
651 lcd_update(); 651 lcd_update();
652 652
diff --git a/apps/plugin.c b/apps/plugin.c
index 83f27ea249..d626ef6488 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -718,7 +718,7 @@ static const struct plugin_api rockbox_api = {
718 semaphore_release, 718 semaphore_release,
719#endif 719#endif
720 720
721 appsversion, 721 rbversion,
722 /* new stuff at the end, sort into place next time 722 /* new stuff at the end, sort into place next time
723 the API gets incompatible */ 723 the API gets incompatible */
724}; 724};
diff --git a/apps/plugin.h b/apps/plugin.h
index 7e198c97bd..a6b864ba44 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -885,7 +885,7 @@ int (*round_value_to_list32)(unsigned long value,
885 void (*semaphore_release)(struct semaphore *s); 885 void (*semaphore_release)(struct semaphore *s);
886#endif 886#endif
887 887
888 const char *appsversion; 888 const char *rbversion;
889 /* new stuff at the end, sort into place next time 889 /* new stuff at the end, sort into place next time
890 the API gets incompatible */ 890 the API gets incompatible */
891}; 891};
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index 165ce54634..945abe924d 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -546,7 +546,7 @@ int main(void)
546 "will continue.\n\n",BATTERY_LOG); 546 "will continue.\n\n",BATTERY_LOG);
547 rb->fdprintf(fd, 547 rb->fdprintf(fd,
548 "Battery bench run for %s version %s\n\n" 548 "Battery bench run for %s version %s\n\n"
549 ,MODEL_NAME,rb->appsversion); 549 ,MODEL_NAME,rb->rbversion);
550 550
551 rb->fdprintf(fd, 551 rb->fdprintf(fd,
552 "Battery type: %d mAh Buffer Entries: %d\n" 552 "Battery type: %d mAh Buffer Entries: %d\n"
@@ -578,7 +578,7 @@ int main(void)
578 rb->fdprintf(fd, "\n--File already present. Resuming Benchmark--\n"); 578 rb->fdprintf(fd, "\n--File already present. Resuming Benchmark--\n");
579 rb->fdprintf(fd, 579 rb->fdprintf(fd,
580 "Battery bench run for %s version %s\n\n" 580 "Battery bench run for %s version %s\n\n"
581 ,MODEL_NAME,rb->appsversion); 581 ,MODEL_NAME,rb->rbversion);
582 rb->close(fd); 582 rb->close(fd);
583 } 583 }
584 584
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c
index 3f5490e754..24542a9398 100644
--- a/apps/plugins/iriver_flash.c
+++ b/apps/plugins/iriver_flash.c
@@ -411,7 +411,7 @@ int flash_rockbox(const char *filename, int section)
411 rb->memset(&hdr, 0, sizeof(struct flash_header)); 411 rb->memset(&hdr, 0, sizeof(struct flash_header));
412 hdr.magic = FLASH_MAGIC; 412 hdr.magic = FLASH_MAGIC;
413 hdr.length = len; 413 hdr.length = len;
414 // rb->strncpy(hdr.version, APPSVERSION, sizeof(hdr.version)-1); 414 // rb->strncpy(hdr.version, rb->rbversion , sizeof(hdr.version)-1);
415 p16 = (uint16_t *)&hdr; 415 p16 = (uint16_t *)&hdr;
416 416
417 rb->snprintf(buf, sizeof(buf), "Programming..."); 417 rb->snprintf(buf, sizeof(buf), "Programming...");
diff --git a/apps/plugins/settings_dumper.c b/apps/plugins/settings_dumper.c
index ea69353e17..93c4f67657 100644
--- a/apps/plugins/settings_dumper.c
+++ b/apps/plugins/settings_dumper.c
@@ -129,7 +129,7 @@ enum plugin_status plugin_start(
129 return PLUGIN_ERROR; 129 return PLUGIN_ERROR;
130 list = rb->get_settings_list(&setting_count); 130 list = rb->get_settings_list(&setting_count);
131 rb->fdprintf(fd, "# .cfg file created by rockbox %s - " 131 rb->fdprintf(fd, "# .cfg file created by rockbox %s - "
132 "http://www.rockbox.org\r\n\r\n", rb->appsversion); 132 "http://www.rockbox.org\r\n\r\n", rb->rbversion);
133 133
134 rb->fdprintf(fd, "# -- Sound settings -- #\r\n"); 134 rb->fdprintf(fd, "# -- Sound settings -- #\r\n");
135 for(i=0;i<setting_count;i++) 135 for(i=0;i<setting_count;i++)
diff --git a/apps/settings.c b/apps/settings.c
index 6349372326..25593e55ac 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -536,7 +536,7 @@ static bool settings_write_config(const char* filename, int options)
536 if (fd < 0) 536 if (fd < 0)
537 return false; 537 return false;
538 fdprintf(fd, "# .cfg file created by rockbox %s - " 538 fdprintf(fd, "# .cfg file created by rockbox %s - "
539 "http://www.rockbox.org\r\n\r\n", appsversion); 539 "http://www.rockbox.org\r\n\r\n", rbversion);
540 for(i=0; i<nb_settings; i++) 540 for(i=0; i<nb_settings; i++)
541 { 541 {
542 if (settings[i].cfg_name == NULL) 542 if (settings[i].cfg_name == NULL)
diff --git a/apps/version.h b/apps/version.h
deleted file mode 100644
index 73828ddfc5..0000000000
--- a/apps/version.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 Björn Stenberg
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#ifndef _VERSION_H_
22#define _VERSION_H_
23
24extern const char appsversion[];
25
26#endif
diff --git a/bootloader/Makefile b/bootloader/Makefile
index 3272510051..07f347ee16 100644
--- a/bootloader/Makefile
+++ b/bootloader/Makefile
@@ -46,12 +46,8 @@ ifdef APPEXTRA
46 INCLUDES += $(patsubst %,-I%,$(subst :, ,$(APPEXTRA))) 46 INCLUDES += $(patsubst %,-I%,$(subst :, ,$(APPEXTRA)))
47endif 47endif
48 48
49ifndef VERSION 49CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) $(EXTRA_DEFINES) \
50VERSION=$(shell date +%y%m%d-%H%M) 50 -DMEM=${MEMORYSIZE}
51endif
52
53CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) \
54 -DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
55 51
56OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 52OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
57SOURCES = $(SRC) 53SOURCES = $(SRC)
diff --git a/bootloader/creativezvm.c b/bootloader/creativezvm.c
index 6469de7c29..73968c3b3f 100644
--- a/bootloader/creativezvm.c
+++ b/bootloader/creativezvm.c
@@ -29,6 +29,7 @@
29#include "button.h" 29#include "button.h"
30#include "common.h" 30#include "common.h"
31#include "usb.h" 31#include "usb.h"
32#include "version.h"
32 33
33 34
34static void load_fw(unsigned char* ptr, unsigned int len) 35static void load_fw(unsigned char* ptr, unsigned int len)
@@ -66,7 +67,7 @@ void main(void)
66 lcd_setfont(FONT_SYSFIXED); 67 lcd_setfont(FONT_SYSFIXED);
67 reset_screen(); 68 reset_screen();
68 printf("Rockbox boot loader"); 69 printf("Rockbox boot loader");
69 printf("Version %s", APPSVERSION); 70 printf("Version " RBVERSION);
70 71
71 ret = storage_init(); 72 ret = storage_init();
72 if(ret) 73 if(ret)
diff --git a/bootloader/gigabeat-s.c b/bootloader/gigabeat-s.c
index 7c429a9b65..dcff26c4de 100644
--- a/bootloader/gigabeat-s.c
+++ b/bootloader/gigabeat-s.c
@@ -35,11 +35,11 @@
35#include "font.h" 35#include "font.h"
36#include "lcd.h" 36#include "lcd.h"
37#include "usb-target.h" 37#include "usb-target.h"
38#include "version.h"
38 39
39#define TAR_CHUNK 512 40#define TAR_CHUNK 512
40#define TAR_HEADER_SIZE 157 41#define TAR_HEADER_SIZE 157
41 42
42const char version[] = APPSVERSION;
43/* Where files sent via MTP are stored */ 43/* Where files sent via MTP are stored */
44static const char basedir[] = "/Content/0b00/00/"; 44static const char basedir[] = "/Content/0b00/00/";
45/* Can use memory after vector table up to 0x01f00000 */ 45/* Can use memory after vector table up to 0x01f00000 */
@@ -346,7 +346,7 @@ void main(void)
346 lcd_clear_display(); 346 lcd_clear_display();
347 347
348 printf("Gigabeat S Rockbox Bootloader"); 348 printf("Gigabeat S Rockbox Bootloader");
349 printf("Version %s", version); 349 printf("Version " RBVERSION);
350 350
351 /* Initialize KPP so we can poll the button states */ 351 /* Initialize KPP so we can poll the button states */
352 button_init_device(); 352 button_init_device();
diff --git a/bootloader/gigabeat.c b/bootloader/gigabeat.c
index 81c069469d..7a634b329c 100644
--- a/bootloader/gigabeat.c
+++ b/bootloader/gigabeat.c
@@ -45,11 +45,10 @@
45#include "usb.h" 45#include "usb.h"
46#include "mmu-arm.h" 46#include "mmu-arm.h"
47#include "rtc.h" 47#include "rtc.h"
48#include "version.h"
48 49
49#include <stdarg.h> 50#include <stdarg.h>
50 51
51char version[] = APPSVERSION;
52
53void shutdown(void) 52void shutdown(void)
54{ 53{
55 /* We need to gracefully spin down the disk to prevent clicks. */ 54 /* We need to gracefully spin down the disk to prevent clicks. */
@@ -174,7 +173,7 @@ void main(void)
174 verbose = true; 173 verbose = true;
175 174
176 printf("Rockbox boot loader"); 175 printf("Rockbox boot loader");
177 printf("Version %s", version); 176 printf("Version " RBVERSION);
178 177
179 sleep(50); /* ATA seems to error without this pause */ 178 sleep(50); /* ATA seems to error without this pause */
180 179
diff --git a/bootloader/iaudio_coldfire.c b/bootloader/iaudio_coldfire.c
index a3b318bbbc..5639a0e59b 100644
--- a/bootloader/iaudio_coldfire.c
+++ b/bootloader/iaudio_coldfire.c
@@ -42,6 +42,8 @@
42#include "power.h" 42#include "power.h"
43#include "powermgmt.h" 43#include "powermgmt.h"
44#include "file.h" 44#include "file.h"
45#include "version.h"
46
45 47
46#include "pcf50606.h" 48#include "pcf50606.h"
47#include "common.h" 49#include "common.h"
@@ -58,8 +60,6 @@ int usb_screen(void)
58 return 0; 60 return 0;
59} 61}
60 62
61char version[] = APPSVERSION;
62
63/* Reset the cookie for the crt0 crash check */ 63/* Reset the cookie for the crt0 crash check */
64inline void __reset_cookie(void) 64inline void __reset_cookie(void)
65{ 65{
@@ -188,7 +188,7 @@ void main(void)
188 } 188 }
189 189
190 printf("Rockbox boot loader"); 190 printf("Rockbox boot loader");
191 printf("Version %s", version); 191 printf("Version " RBVERSION);
192 192
193 check_battery(); 193 check_battery();
194 194
diff --git a/bootloader/ipod.c b/bootloader/ipod.c
index ee555793d0..af4c1576bb 100644
--- a/bootloader/ipod.c
+++ b/bootloader/ipod.c
@@ -44,6 +44,7 @@
44#include "common.h" 44#include "common.h"
45#include "hwcompat.h" 45#include "hwcompat.h"
46#include "usb.h" 46#include "usb.h"
47#include "version.h"
47 48
48#define XSC(X) #X 49#define XSC(X) #X
49#define SC(X) XSC(X) 50#define SC(X) XSC(X)
@@ -56,9 +57,6 @@
56/* A buffer to load the Linux kernel or Rockbox into */ 57/* A buffer to load the Linux kernel or Rockbox into */
57unsigned char *loadbuffer = (unsigned char *)DRAM_START; 58unsigned char *loadbuffer = (unsigned char *)DRAM_START;
58 59
59/* Bootloader version */
60char version[] = APPSVERSION;
61
62#if CONFIG_KEYPAD == IPOD_4G_PAD && !defined(IPOD_MINI) 60#if CONFIG_KEYPAD == IPOD_4G_PAD && !defined(IPOD_MINI)
63/* check if number of seconds has past */ 61/* check if number of seconds has past */
64int timer_check(int clock_start, unsigned int usecs) 62int timer_check(int clock_start, unsigned int usecs)
@@ -335,7 +333,7 @@ void* main(void)
335 lcd_setfont(FONT_SYSFIXED); 333 lcd_setfont(FONT_SYSFIXED);
336 334
337 printf("Rockbox boot loader"); 335 printf("Rockbox boot loader");
338 printf("Version: %s", version); 336 printf("Version: " RBVERSION);
339 printf("IPOD version: 0x%08x", IPOD_HW_REVISION); 337 printf("IPOD version: 0x%08x", IPOD_HW_REVISION);
340 338
341 i=ata_init(); 339 i=ata_init();
diff --git a/bootloader/ipodnano2g.c b/bootloader/ipodnano2g.c
index 14b5bbce20..b2b2138f78 100644
--- a/bootloader/ipodnano2g.c
+++ b/bootloader/ipodnano2g.c
@@ -44,6 +44,7 @@
44#include "power.h" 44#include "power.h"
45#include "file.h" 45#include "file.h"
46#include "common.h" 46#include "common.h"
47#include "version.h"
47 48
48/* Safety measure - maximum allowed firmware image size. 49/* Safety measure - maximum allowed firmware image size.
49 The largest known current (October 2009) firmware is about 6.2MB so 50 The largest known current (October 2009) firmware is about 6.2MB so
@@ -54,9 +55,6 @@
54/* The buffer to load the firmware into - use an uncached alias of 0x08000000 */ 55/* The buffer to load the firmware into - use an uncached alias of 0x08000000 */
55unsigned char *loadbuffer = (unsigned char *)0x48000000; 56unsigned char *loadbuffer = (unsigned char *)0x48000000;
56 57
57/* Bootloader version */
58char version[] = APPSVERSION;
59
60extern int line; 58extern int line;
61 59
62void fatal_error(void) 60void fatal_error(void)
@@ -209,7 +207,7 @@ void main(void)
209 lcd_setfont(FONT_SYSFIXED); 207 lcd_setfont(FONT_SYSFIXED);
210 208
211 printf("Rockbox boot loader"); 209 printf("Rockbox boot loader");
212 printf("Version: %s", version); 210 printf("Version: " RBVERSION);
213 211
214 i = storage_init(); 212 i = storage_init();
215 213
diff --git a/bootloader/iriver_h1x0.c b/bootloader/iriver_h1x0.c
index f16a5128c9..1afbafa830 100644
--- a/bootloader/iriver_h1x0.c
+++ b/bootloader/iriver_h1x0.c
@@ -46,6 +46,7 @@
46#include "eeprom_settings.h" 46#include "eeprom_settings.h"
47#include "rbunicode.h" 47#include "rbunicode.h"
48#include "common.h" 48#include "common.h"
49#include "version.h"
49 50
50#include <stdarg.h> 51#include <stdarg.h>
51 52
@@ -58,8 +59,6 @@
58static bool recovery_mode = false; 59static bool recovery_mode = false;
59#endif 60#endif
60 61
61char version[] = APPSVERSION;
62
63/* Reset the cookie for the crt0 crash check */ 62/* Reset the cookie for the crt0 crash check */
64inline void __reset_cookie(void) 63inline void __reset_cookie(void)
65{ 64{
@@ -254,7 +253,7 @@ void failsafe_menu(void)
254 extern int line; 253 extern int line;
255 254
256 reset_screen(); 255 reset_screen();
257 printf("Bootloader %s", version); 256 printf("Bootloader " RBVERSION);
258 check_battery(); 257 check_battery();
259 printf("========================="); 258 printf("=========================");
260 line += FAILSAFE_OPTIONS; 259 line += FAILSAFE_OPTIONS;
@@ -502,7 +501,7 @@ void main(void)
502 lcd_setfont(FONT_SYSFIXED); 501 lcd_setfont(FONT_SYSFIXED);
503 502
504 printf("Rockbox boot loader"); 503 printf("Rockbox boot loader");
505 printf("Version %s", version); 504 printf("Version " RBVERSION);
506 505
507 /* No need to wait here more because lcd_init and others already do that. */ 506 /* No need to wait here more because lcd_init and others already do that. */
508 // sleep(HZ/50); /* Allow the button driver to check the buttons */ 507 // sleep(HZ/50); /* Allow the button driver to check the buttons */
diff --git a/bootloader/iriver_h300.c b/bootloader/iriver_h300.c
index d15efb9b72..893532cac7 100644
--- a/bootloader/iriver_h300.c
+++ b/bootloader/iriver_h300.c
@@ -47,6 +47,7 @@
47#include "common.h" 47#include "common.h"
48#include "rbunicode.h" 48#include "rbunicode.h"
49#include "isp1362.h" 49#include "isp1362.h"
50#include "version.h"
50 51
51#include <stdarg.h> 52#include <stdarg.h>
52 53
@@ -55,8 +56,6 @@
55 56
56#define DRAM_START 0x31000000 57#define DRAM_START 0x31000000
57 58
58char version[] = APPSVERSION;
59
60/* Reset the cookie for the crt0 crash check */ 59/* Reset the cookie for the crt0 crash check */
61inline void __reset_cookie(void) 60inline void __reset_cookie(void)
62{ 61{
@@ -210,7 +209,7 @@ void main(void)
210 lcd_setfont(FONT_SYSFIXED); 209 lcd_setfont(FONT_SYSFIXED);
211 210
212 printf("Rockbox boot loader"); 211 printf("Rockbox boot loader");
213 printf("Version %s", version); 212 printf("Version " RBVERSION);
214 213
215 sleep(HZ/50); /* Allow the button driver to check the buttons */ 214 sleep(HZ/50); /* Allow the button driver to check the buttons */
216 rec_button = ((button_status() & BUTTON_REC) == BUTTON_REC) 215 rec_button = ((button_status() & BUTTON_REC) == BUTTON_REC)
diff --git a/bootloader/main-e200r-installer.c b/bootloader/main-e200r-installer.c
index 0a7b56b1b6..defdea4574 100644
--- a/bootloader/main-e200r-installer.c
+++ b/bootloader/main-e200r-installer.c
@@ -39,9 +39,7 @@
39#include "i2c.h" 39#include "i2c.h"
40#include "backlight-target.h" 40#include "backlight-target.h"
41#include "power.h" 41#include "power.h"
42 42#include "version.h"
43/* Bootloader version */
44char version[] = APPSVERSION;
45 43
46#define START_SECTOR_OF_ROM 1 44#define START_SECTOR_OF_ROM 1
47#define ROMSECTOR_TO_HACK 63 45#define ROMSECTOR_TO_HACK 63
@@ -116,7 +114,7 @@ void* main(void)
116 lcd_setfont(FONT_SYSFIXED); 114 lcd_setfont(FONT_SYSFIXED);
117 115
118 printf("Rockbox e200R installer"); 116 printf("Rockbox e200R installer");
119 printf("Version: %s", version); 117 printf("Version: " RBVERSION);
120 printf(MODEL_NAME); 118 printf(MODEL_NAME);
121 printf(""); 119 printf("");
122 120
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c
index 4f1fe2a4e1..37f42eda43 100644
--- a/bootloader/main-pp.c
+++ b/bootloader/main-pp.c
@@ -39,6 +39,7 @@
39#include "crc32-mi4.h" 39#include "crc32-mi4.h"
40#include <string.h> 40#include <string.h>
41#include "power.h" 41#include "power.h"
42#include "version.h"
42#if defined(SANSA_E200) || defined(PHILIPS_SA9200) 43#if defined(SANSA_E200) || defined(PHILIPS_SA9200)
43#include "i2c.h" 44#include "i2c.h"
44#include "backlight-target.h" 45#include "backlight-target.h"
@@ -95,9 +96,6 @@ extern int show_logo(void);
95/* A buffer to load the original firmware or Rockbox into */ 96/* A buffer to load the original firmware or Rockbox into */
96unsigned char *loadbuffer = (unsigned char *)DRAM_START; 97unsigned char *loadbuffer = (unsigned char *)DRAM_START;
97 98
98/* Bootloader version */
99char version[] = APPSVERSION;
100
101/* Locations and sizes in hidden partition on Sansa */ 99/* Locations and sizes in hidden partition on Sansa */
102#if (CONFIG_STORAGE & STORAGE_SD) 100#if (CONFIG_STORAGE & STORAGE_SD)
103#define PPMI_SECTOR_OFFSET 1024 101#define PPMI_SECTOR_OFFSET 1024
@@ -525,7 +523,7 @@ void* main(void)
525 lcd_setfont(FONT_SYSFIXED); 523 lcd_setfont(FONT_SYSFIXED);
526 524
527 printf("Rockbox boot loader"); 525 printf("Rockbox boot loader");
528 printf("Version: %s", version); 526 printf("Version: " RBVERSION);
529 printf(MODEL_NAME); 527 printf(MODEL_NAME);
530 528
531 i=storage_init(); 529 i=storage_init();
diff --git a/bootloader/meizu_m3.c b/bootloader/meizu_m3.c
index 61aa3cecbe..7c0a5bca2d 100644
--- a/bootloader/meizu_m3.c
+++ b/bootloader/meizu_m3.c
@@ -54,7 +54,6 @@
54#include "audiohw.h" 54#include "audiohw.h"
55#include "rtc.h" 55#include "rtc.h"
56 56
57char version[] = APPSVERSION;
58#define LONG_DELAY 200000 57#define LONG_DELAY 200000
59#define SHORT_DELAY 50000 58#define SHORT_DELAY 50000
60#define PAUSE_DELAY 50000 59#define PAUSE_DELAY 50000
diff --git a/bootloader/meizu_m6sl.c b/bootloader/meizu_m6sl.c
index 0b335bec8a..c230ec3c08 100644
--- a/bootloader/meizu_m6sl.c
+++ b/bootloader/meizu_m6sl.c
@@ -47,7 +47,6 @@
47 47
48#include <stdarg.h> 48#include <stdarg.h>
49 49
50char version[] = APPSVERSION;
51#define LONG_DELAY 200000 50#define LONG_DELAY 200000
52#define SHORT_DELAY 50000 51#define SHORT_DELAY 50000
53#define PAUSE_DELAY 50000 52#define PAUSE_DELAY 50000
diff --git a/bootloader/meizu_m6sp.c b/bootloader/meizu_m6sp.c
index 064d3fc8df..c57fe91b22 100644
--- a/bootloader/meizu_m6sp.c
+++ b/bootloader/meizu_m6sp.c
@@ -45,7 +45,6 @@
45 45
46#include <stdarg.h> 46#include <stdarg.h>
47 47
48char version[] = APPSVERSION;
49#define LONG_DELAY 200000 48#define LONG_DELAY 200000
50#define SHORT_DELAY 50000 49#define SHORT_DELAY 50000
51#define PAUSE_DELAY 50000 50#define PAUSE_DELAY 50000
diff --git a/bootloader/mini2440.c b/bootloader/mini2440.c
index d735084c6a..f4441c3730 100644
--- a/bootloader/mini2440.c
+++ b/bootloader/mini2440.c
@@ -46,6 +46,7 @@
46#include "dma-target.h" 46#include "dma-target.h"
47#include "uart-s3c2440.h" 47#include "uart-s3c2440.h"
48#include "led-mini2440.h" 48#include "led-mini2440.h"
49#include "version.h"
49 50
50 51
51int main(void) 52int main(void)
@@ -78,7 +79,7 @@ int main(void)
78 verbose = true; 79 verbose = true;
79 80
80 printf("Rockbox boot loader"); 81 printf("Rockbox boot loader");
81 printf("Version %s", APPSVERSION); 82 printf("Version " RBVERSION);
82 83
83 rc = storage_init(); 84 rc = storage_init();
84 if(rc) 85 if(rc)
diff --git a/bootloader/mpio_hd200.c b/bootloader/mpio_hd200.c
index a031234b5a..8062f7ef22 100644
--- a/bootloader/mpio_hd200.c
+++ b/bootloader/mpio_hd200.c
@@ -43,6 +43,7 @@
43#include "file.h" 43#include "file.h"
44 44
45#include "common.h" 45#include "common.h"
46#include "version.h"
46 47
47#include <stdarg.h> 48#include <stdarg.h>
48 49
@@ -78,8 +79,6 @@ int usb_screen(void)
78 return 0; 79 return 0;
79} 80}
80 81
81char version[] = APPSVERSION;
82
83static inline bool _charger_inserted(void) 82static inline bool _charger_inserted(void)
84{ 83{
85 return (GPIO1_READ & (1<<14)) ? false : true; 84 return (GPIO1_READ & (1<<14)) ? false : true;
@@ -233,7 +232,7 @@ static void bootmenu(void)
233 /* backbone of menu */ 232 /* backbone of menu */
234 /* run the loader */ 233 /* run the loader */
235 printf("Rockbox boot loader"); 234 printf("Rockbox boot loader");
236 printf("Ver: %s", version); 235 printf("Ver: " RBVERSION);
237 236
238 check_battery(); 237 check_battery();
239 238
diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c
index 9052cbdc3c..d6ca58e009 100644
--- a/bootloader/mrobe500.c
+++ b/bootloader/mrobe500.c
@@ -45,6 +45,7 @@
45#include "tsc2100.h" 45#include "tsc2100.h"
46#include "time.h" 46#include "time.h"
47#include "system-arm.h" 47#include "system-arm.h"
48#include "version.h"
48 49
49void main(void) 50void main(void)
50{ 51{
@@ -83,7 +84,7 @@ void main(void)
83 verbose = true; 84 verbose = true;
84 85
85 printf("Rockbox boot loader"); 86 printf("Rockbox boot loader");
86 printf("Version %s", APPSVERSION); 87 printf("Version " RBVERSION);
87 88
88 /* Enter USB mode without USB thread */ 89 /* Enter USB mode without USB thread */
89 if(usb_detect() == USB_INSERTED) 90 if(usb_detect() == USB_INSERTED)
diff --git a/bootloader/ondavx747.c b/bootloader/ondavx747.c
index 994f45d78d..4dfc78d58c 100644
--- a/bootloader/ondavx747.c
+++ b/bootloader/ondavx747.c
@@ -33,6 +33,7 @@
33#include "disk.h" 33#include "disk.h"
34#include "string.h" 34#include "string.h"
35#include "adc.h" 35#include "adc.h"
36#include "version.h"
36 37
37extern int show_logo(void); 38extern int show_logo(void);
38extern void power_off(void); 39extern void power_off(void);
@@ -296,7 +297,7 @@ int main(void)
296 if(verbose) 297 if(verbose)
297 reset_screen(); 298 reset_screen();
298 printf(MODEL_NAME" Rockbox Bootloader"); 299 printf(MODEL_NAME" Rockbox Bootloader");
299 printf("Version "APPSVERSION); 300 printf("Version " RBVERSION);
300 301
301#ifdef HAS_BUTTON_HOLD 302#ifdef HAS_BUTTON_HOLD
302 if(button_hold()) 303 if(button_hold())
diff --git a/bootloader/samsung_yps3.c b/bootloader/samsung_yps3.c
index 3cf5cb70ec..d4eff81e01 100644
--- a/bootloader/samsung_yps3.c
+++ b/bootloader/samsung_yps3.c
@@ -57,7 +57,6 @@
57#include "wmcodec.h" 57#include "wmcodec.h"
58#include "nand-target.h" 58#include "nand-target.h"
59 59
60char version[] = APPSVERSION;
61#define LONG_DELAY 200000 60#define LONG_DELAY 200000
62#define SHORT_DELAY 50000 61#define SHORT_DELAY 50000
63#define PAUSE_DELAY 50000 62#define PAUSE_DELAY 50000
diff --git a/bootloader/show_logo.c b/bootloader/show_logo.c
index 09c6dbd4aa..3273034d05 100644
--- a/bootloader/show_logo.c
+++ b/bootloader/show_logo.c
@@ -23,13 +23,14 @@
23#include "font.h" 23#include "font.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <string.h> 25#include <string.h>
26#include "version.h"
26 27
27#include "bitmaps/rockboxlogo.h" 28#include "bitmaps/rockboxlogo.h"
28 29
29#if LCD_WIDTH <= 128 30#if LCD_WIDTH <= 128
30#define BOOT_VERSION ("Boot " APPSVERSION) 31#define BOOT_VERSION ("Boot " RBVERSION)
31#else 32#else
32#define BOOT_VERSION ("Boot Ver. " APPSVERSION) 33#define BOOT_VERSION ("Boot Ver. " RBVERSION)
33#endif 34#endif
34 35
35/* Ensure TEXT_XPOS is >= 0 */ 36/* Ensure TEXT_XPOS is >= 0 */
diff --git a/bootloader/telechips.c b/bootloader/telechips.c
index 98f8bebc38..9e9e75c183 100644
--- a/bootloader/telechips.c
+++ b/bootloader/telechips.c
@@ -43,6 +43,7 @@
43#include "power.h" 43#include "power.h"
44#include "file.h" 44#include "file.h"
45#include "common.h" 45#include "common.h"
46#include "version.h"
46 47
47/* Show the Rockbox logo - in show_logo.c */ 48/* Show the Rockbox logo - in show_logo.c */
48extern int show_logo(void); 49extern int show_logo(void);
@@ -50,8 +51,6 @@ extern int show_logo(void);
50/* Address to load main Rockbox image to */ 51/* Address to load main Rockbox image to */
51#define LOAD_ADDRESS 0x20000000 /* DRAM_START */ 52#define LOAD_ADDRESS 0x20000000 /* DRAM_START */
52 53
53char version[] = APPSVERSION;
54
55extern int line; 54extern int line;
56 55
57#define MAX_LOAD_SIZE (8*1024*1024) /* Arbitrary, but plenty. */ 56#define MAX_LOAD_SIZE (8*1024*1024) /* Arbitrary, but plenty. */
@@ -152,7 +151,7 @@ void* main(void)
152 available for loading the firmware. Otherwise display the debug screen. */ 151 available for loading the firmware. Otherwise display the debug screen. */
153#ifdef TCCBOOT 152#ifdef TCCBOOT
154 printf("Rockbox boot loader"); 153 printf("Rockbox boot loader");
155 printf("Version %s", version); 154 printf("Version " RBVERSION);
156 155
157 printf("ATA"); 156 printf("ATA");
158 rc = storage_init(); 157 rc = storage_init();
diff --git a/bootloader/tpj1022.c b/bootloader/tpj1022.c
index db709d1b58..159dcc63cd 100644
--- a/bootloader/tpj1022.c
+++ b/bootloader/tpj1022.c
@@ -39,8 +39,6 @@
39#include "file.h" 39#include "file.h"
40#include "common.h" 40#include "common.h"
41 41
42char version[] = APPSVERSION;
43
44void* main(void) 42void* main(void)
45{ 43{
46 int i; 44 int i;
diff --git a/docs/PLUGIN_API.new b/docs/PLUGIN_API.new
index 1989386661..75c82d447b 100644
--- a/docs/PLUGIN_API.new
+++ b/docs/PLUGIN_API.new
@@ -39,7 +39,7 @@ bool action_userabort(int timeout)
39 \return 39 \return
40 \description 40 \description
41 41
42const char *appsversion 42const char *rbversion
43 \return version of the plugin API 43 \return version of the plugin API
44 \description 44 \description
45 45
diff --git a/firmware/firmware.make b/firmware/firmware.make
index 52b5a19cc6..105fe7e111 100644
--- a/firmware/firmware.make
+++ b/firmware/firmware.make
@@ -17,13 +17,14 @@ FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC))
17ifeq (,$(findstring -DARCHOS_PLAYER,$(TARGET))) 17ifeq (,$(findstring -DARCHOS_PLAYER,$(TARGET)))
18 FIRMLIB_OBJ += $(BUILDDIR)/sysfont.o 18 FIRMLIB_OBJ += $(BUILDDIR)/sysfont.o
19endif 19endif
20FIRMLIB_OBJ += $(BUILDDIR)/version.o
20OTHER_SRC += $(FIRMLIB_SRC) 21OTHER_SRC += $(FIRMLIB_SRC)
21 22
22FIRMLIB = $(BUILDDIR)/firmware/libfirmware.a 23FIRMLIB = $(BUILDDIR)/firmware/libfirmware.a
23 24
24SYSFONT = $(ROOTDIR)/fonts/08-Schumacher-Clean.bdf 25SYSFONT = $(ROOTDIR)/fonts/08-Schumacher-Clean.bdf
25 26
26CLEANOBJS += $(BUILDDIR)/sysfont.* 27CLEANOBJS += $(BUILDDIR)/sysfont.* $(BUILDDIR)/version.*
27 28
28# Limits for the built-in sysfont: ASCII for bootloaders, ISO8859-1 for normal builds 29# Limits for the built-in sysfont: ASCII for bootloaders, ISO8859-1 for normal builds
29ifneq (,$(findstring -DBOOTLOADER,$(EXTRA_DEFINES))) 30ifneq (,$(findstring -DBOOTLOADER,$(EXTRA_DEFINES)))
@@ -43,3 +44,5 @@ $(BUILDDIR)/sysfont.o: $(SYSFONT) $(BUILDDIR)/sysfont.h
43 $(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(BUILDDIR)/sysfont.c $< 44 $(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(BUILDDIR)/sysfont.c $<
44 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$(BUILDDIR)/sysfont.c))$(CC) $(CFLAGS) -c $(BUILDDIR)/sysfont.c -o $@ 45 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$(BUILDDIR)/sysfont.c))$(CC) $(CFLAGS) -c $(BUILDDIR)/sysfont.c -o $@
45 46
47$(BUILDDIR)/version.c $(BUILDDIR)/version.h:
48 $(TOOLSDIR)/genversion.sh $(BUILDDIR) $(TOOLSDIR)/version.sh $(ROOTDIR)
diff --git a/flash/bootbox/Makefile b/flash/bootbox/Makefile
index 7ef5364a6e..754f95dd49 100644
--- a/flash/bootbox/Makefile
+++ b/flash/bootbox/Makefile
@@ -27,7 +27,7 @@ ifdef APPEXTRA
27endif 27endif
28 28
29CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) \ 29CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) \
30 -DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} 30 $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
31 31
32OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 32OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
33SOURCES = $(SRC) 33SOURCES = $(SRC)
diff --git a/gdb/Makefile b/gdb/Makefile
index 83181999f3..0cd9990cd1 100644
--- a/gdb/Makefile
+++ b/gdb/Makefile
@@ -28,7 +28,7 @@ VERSION=$(shell date +%y%m%d-%H%M)
28endif 28endif
29 29
30CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) \ 30CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) \
31 -DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} 31 $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
32 32
33OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 33OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
34SOURCES = $(SRC) 34SOURCES = $(SRC)
diff --git a/tools/configure b/tools/configure
index d091e3258d..9654cc67f9 100755
--- a/tools/configure
+++ b/tools/configure
@@ -3103,7 +3103,6 @@ export BUILDDIR=@PWD@
3103export LANGUAGE=@LANGUAGE@ 3103export LANGUAGE=@LANGUAGE@
3104export VOICELANGUAGE=@VOICELANGUAGE@ 3104export VOICELANGUAGE=@VOICELANGUAGE@
3105export MEMORYSIZE=@MEMORY@ 3105export MEMORYSIZE=@MEMORY@
3106export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
3107export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d') 3106export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3108export MKFIRMWARE=@TOOL@ 3107export MKFIRMWARE=@TOOL@
3109export BMP2RB_MONO=@BMP2RB_MONO@ 3108export BMP2RB_MONO=@BMP2RB_MONO@
diff --git a/tools/genversion.sh b/tools/genversion.sh
new file mode 100755
index 0000000000..cf8d999e5b
--- /dev/null
+++ b/tools/genversion.sh
@@ -0,0 +1,42 @@
1#!/bin/sh
2# __________ __ ___.
3# Open \______ \ ____ ____ | | _\_ |__ _______ ___
4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/
8
9# Usage: genversion.sh destination-dir path-to-version.sh [source-root]
10
11# Generate version.[ch] files
12
13VERSION=`$2 $3`
14
15cat > "$1/_version.h" << EOF
16/* Generated by genversion.sh */
17extern const char rbversion[];
18#define RBVERSION "$VERSION"
19EOF
20
21if [ -f "$1/version.h" ]
22 then if diff "$1/_version.h" "$1/version.h" > /dev/null
23 then mv "$1/_version.h" "$1/version.h"
24 else rm -f "$1/_version.h"
25 fi
26 else mv "$1/_version.h" "$1/version.h"
27fi
28
29
30cat > "$1/_version.c" << EOF
31/* Generated by genversion.sh */
32const char rbversion[] = "$VERSION";
33EOF
34
35if [ -f "$1/version.c" ]
36 then if diff "$1/_version.c" "$1/version.c" > /dev/null
37 then mv "$1/_version.c" "$1/version.c"
38 else rm -f "$1/_version.c"
39 fi
40 else mv "$1/_version.c" "$1/version.c"
41fi
42
diff --git a/tools/root.make b/tools/root.make
index f2373f5f7d..ddea297ccf 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -10,8 +10,7 @@
10include $(TOOLSDIR)/functions.make 10include $(TOOLSDIR)/functions.make
11 11
12DEFINES = -DROCKBOX -DMEMORYSIZE=$(MEMORYSIZE) -DMEM=$(MEMORYSIZE) $(TARGET) \ 12DEFINES = -DROCKBOX -DMEMORYSIZE=$(MEMORYSIZE) -DMEM=$(MEMORYSIZE) $(TARGET) \
13 -DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" \ 13 -DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" $(BUILDDATE) \
14 -DAPPSVERSION=\"$(VERSION)\" $(BUILDDATE) \
15 $(EXTRA_DEFINES) # <-- -DSIMULATOR or not 14 $(EXTRA_DEFINES) # <-- -DSIMULATOR or not
16INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC) 15INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC)
17 16
diff --git a/uisimulator/common/Makefile b/uisimulator/common/Makefile
index ef68230153..f54df57b27 100644
--- a/uisimulator/common/Makefile
+++ b/uisimulator/common/Makefile
@@ -32,7 +32,7 @@ include $(TOOLSDIR)/makesrc.inc
32OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 32OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
33 33
34DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ 34DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \
35$(TARGET) -DAPPSVERSION=\"$(VERSION)\" -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES) 35$(TARGET) -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES)
36 36
37SOURCES = $(SRC) 37SOURCES = $(SRC)
38 38