diff options
-rw-r--r-- | firmware/drivers/lcd-recorder.c | 3 | ||||
-rw-r--r-- | firmware/export/config-fmrecorder.h | 7 | ||||
-rw-r--r-- | firmware/export/config-h100.h | 28 | ||||
-rw-r--r-- | firmware/export/config-ondiofm.h | 7 | ||||
-rw-r--r-- | firmware/export/config-ondiosp.h | 8 | ||||
-rw-r--r-- | firmware/export/config-player.h | 6 | ||||
-rw-r--r-- | firmware/export/config-recorder.h | 7 | ||||
-rw-r--r-- | firmware/export/config-recorderv2.h | 7 | ||||
-rw-r--r-- | firmware/export/config.h | 2 | ||||
-rw-r--r-- | firmware/export/lcd.h | 5 | ||||
-rwxr-xr-x | tools/configure | 28 | ||||
-rw-r--r-- | uisimulator/common/sim_icons.c | 1 | ||||
-rw-r--r-- | uisimulator/x11/Makefile | 88 | ||||
-rw-r--r-- | uisimulator/x11/button-x11.c | 1 | ||||
-rw-r--r-- | uisimulator/x11/config-x11.h (renamed from uisimulator/x11/config.h) | 0 | ||||
-rw-r--r-- | uisimulator/x11/lcd-x11.c | 1 | ||||
-rw-r--r-- | uisimulator/x11/screenhack.c | 4 | ||||
-rw-r--r-- | uisimulator/x11/screenhack.h | 2 | ||||
-rw-r--r-- | uisimulator/x11/utils.h | 2 |
19 files changed, 142 insertions, 65 deletions
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index a711a8fa6d..00fa63cd4e 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c | |||
@@ -106,6 +106,9 @@ static int curfont = FONT_SYSFIXED; | |||
106 | static int xoffset; /* needed for flip */ | 106 | static int xoffset; /* needed for flip */ |
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | int lcd_width = 112; | ||
110 | int lcd_height = 64; | ||
111 | |||
109 | unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; | 112 | unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; |
110 | 113 | ||
111 | /* All zeros and ones bitmaps for area filling */ | 114 | /* All zeros and ones bitmaps for area filling */ |
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index b72eb9794a..16085fb480 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h | |||
@@ -4,12 +4,18 @@ | |||
4 | /* define this if you have a bitmap LCD display */ | 4 | /* define this if you have a bitmap LCD display */ |
5 | #define HAVE_LCD_BITMAP 1 | 5 | #define HAVE_LCD_BITMAP 1 |
6 | 6 | ||
7 | /* LCD dimensions */ | ||
8 | #define LCD_WIDTH 112 | ||
9 | #define LCD_HEIGHT 64 | ||
10 | |||
7 | /* define this if you have a Recorder style 10-key keyboard */ | 11 | /* define this if you have a Recorder style 10-key keyboard */ |
8 | #define HAVE_RECORDER_KEYPAD 1 | 12 | #define HAVE_RECORDER_KEYPAD 1 |
9 | 13 | ||
10 | /* define this if you have a real-time clock */ | 14 | /* define this if you have a real-time clock */ |
11 | #define HAVE_RTC 1 | 15 | #define HAVE_RTC 1 |
12 | 16 | ||
17 | #ifndef SIMULATOR | ||
18 | |||
13 | /* Define this if you have a MAS3587F */ | 19 | /* Define this if you have a MAS3587F */ |
14 | #define HAVE_MAS3587F | 20 | #define HAVE_MAS3587F |
15 | 21 | ||
@@ -64,3 +70,4 @@ | |||
64 | /* Define this for LCD backlight available */ | 70 | /* Define this for LCD backlight available */ |
65 | #define HAVE_BACKLIGHT | 71 | #define HAVE_BACKLIGHT |
66 | 72 | ||
73 | #endif /* SIMULATOR */ | ||
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h new file mode 100644 index 0000000000..2efe4834a7 --- /dev/null +++ b/firmware/export/config-h100.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* define this if you have recording possibility */ | ||
2 | #define HAVE_RECORDING 1 | ||
3 | |||
4 | /* define this if you have a bitmap LCD display */ | ||
5 | #define HAVE_LCD_BITMAP 1 | ||
6 | |||
7 | /* LCD dimensions */ | ||
8 | #define LCD_WIDTH 160 | ||
9 | #define LCD_HEIGHT 128 | ||
10 | |||
11 | /* define this if you have the Recorder's 10-key keyboard */ | ||
12 | #define HAVE_RECORDER_KEYPAD 1 | ||
13 | |||
14 | #ifndef SIMULATOR | ||
15 | |||
16 | /* Define this if the platform has batteries */ | ||
17 | #define HAVE_BATTERIES 1 | ||
18 | |||
19 | /* The start address index for ROM builds */ | ||
20 | #define ROM_START 0x11010 | ||
21 | |||
22 | /* Define this for programmable LED available */ | ||
23 | #define HAVE_LED | ||
24 | |||
25 | /* Define this for LCD backlight available */ | ||
26 | #define HAVE_BACKLIGHT | ||
27 | |||
28 | #endif | ||
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h index b7b557e1ec..33a4f91b5f 100644 --- a/firmware/export/config-ondiofm.h +++ b/firmware/export/config-ondiofm.h | |||
@@ -4,9 +4,15 @@ | |||
4 | /* define this if you have a bitmap LCD display */ | 4 | /* define this if you have a bitmap LCD display */ |
5 | #define HAVE_LCD_BITMAP 1 | 5 | #define HAVE_LCD_BITMAP 1 |
6 | 6 | ||
7 | /* LCD dimensions */ | ||
8 | #define LCD_WIDTH 112 | ||
9 | #define LCD_HEIGHT 64 | ||
10 | |||
7 | /* define this if you have an Ondio style 6-key keyboard */ | 11 | /* define this if you have an Ondio style 6-key keyboard */ |
8 | #define HAVE_ONDIO_KEYPAD | 12 | #define HAVE_ONDIO_KEYPAD |
9 | 13 | ||
14 | #ifndef SIMULATOR | ||
15 | |||
10 | /* Define this if you have a MAS3587F */ | 16 | /* Define this if you have a MAS3587F */ |
11 | #define HAVE_MAS3587F | 17 | #define HAVE_MAS3587F |
12 | 18 | ||
@@ -64,3 +70,4 @@ | |||
64 | /* Define this for MMC support instead of ATA harddisk */ | 70 | /* Define this for MMC support instead of ATA harddisk */ |
65 | #define HAVE_MMC | 71 | #define HAVE_MMC |
66 | 72 | ||
73 | #endif /* SIMULATOR */ | ||
diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h index 4189448070..a4f95a2947 100644 --- a/firmware/export/config-ondiosp.h +++ b/firmware/export/config-ondiosp.h | |||
@@ -4,9 +4,15 @@ | |||
4 | /* define this if you have a bitmap LCD display */ | 4 | /* define this if you have a bitmap LCD display */ |
5 | #define HAVE_LCD_BITMAP 1 | 5 | #define HAVE_LCD_BITMAP 1 |
6 | 6 | ||
7 | /* LCD dimensions */ | ||
8 | #define LCD_WIDTH 112 | ||
9 | #define LCD_HEIGHT 64 | ||
10 | |||
7 | /* define this if you have an Ondio style 6-key keyboard */ | 11 | /* define this if you have an Ondio style 6-key keyboard */ |
8 | #define HAVE_ONDIO_KEYPAD | 12 | #define HAVE_ONDIO_KEYPAD |
9 | 13 | ||
14 | #ifndef SIMULATOR | ||
15 | |||
10 | /* Define this if you have a MAS3587F */ | 16 | /* Define this if you have a MAS3587F */ |
11 | #define HAVE_MAS3587F | 17 | #define HAVE_MAS3587F |
12 | 18 | ||
@@ -64,3 +70,5 @@ | |||
64 | /* Define this for MMC support instead of ATA harddisk */ | 70 | /* Define this for MMC support instead of ATA harddisk */ |
65 | #define HAVE_MMC | 71 | #define HAVE_MMC |
66 | 72 | ||
73 | #endif /* SIMULATOR */ | ||
74 | |||
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h index 2e50a2fc85..9f060512fa 100644 --- a/firmware/export/config-player.h +++ b/firmware/export/config-player.h | |||
@@ -1,9 +1,14 @@ | |||
1 | /* define this if you have a charcell LCD display */ | 1 | /* define this if you have a charcell LCD display */ |
2 | #define HAVE_LCD_CHARCELLS 1 | 2 | #define HAVE_LCD_CHARCELLS 1 |
3 | 3 | ||
4 | /* LCD dimensions (for the simulator) */ | ||
5 | #define LCD_WIDTH (4*11*6) /* Display width in pixels */ | ||
6 | #define LCD_HEIGHT (4*16+2*24) /* 4*char + 2*icons */ | ||
7 | |||
4 | /* define this if you have the Player's keyboard */ | 8 | /* define this if you have the Player's keyboard */ |
5 | #define HAVE_PLAYER_KEYPAD 1 | 9 | #define HAVE_PLAYER_KEYPAD 1 |
6 | 10 | ||
11 | #ifndef SIMULATOR | ||
7 | /* Define this if you have a MAS3507D */ | 12 | /* Define this if you have a MAS3507D */ |
8 | #define HAVE_MAS3507D | 13 | #define HAVE_MAS3507D |
9 | 14 | ||
@@ -44,3 +49,4 @@ | |||
44 | /* Define this for LCD backlight available */ | 49 | /* Define this for LCD backlight available */ |
45 | #define HAVE_BACKLIGHT | 50 | #define HAVE_BACKLIGHT |
46 | 51 | ||
52 | #endif /* SIMULATOR */ | ||
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h index b228dea285..5edba3bf85 100644 --- a/firmware/export/config-recorder.h +++ b/firmware/export/config-recorder.h | |||
@@ -4,12 +4,18 @@ | |||
4 | /* define this if you have a bitmap LCD display */ | 4 | /* define this if you have a bitmap LCD display */ |
5 | #define HAVE_LCD_BITMAP 1 | 5 | #define HAVE_LCD_BITMAP 1 |
6 | 6 | ||
7 | /* LCD dimensions */ | ||
8 | #define LCD_WIDTH 112 | ||
9 | #define LCD_HEIGHT 64 | ||
10 | |||
7 | /* define this if you have the Recorder's 10-key keyboard */ | 11 | /* define this if you have the Recorder's 10-key keyboard */ |
8 | #define HAVE_RECORDER_KEYPAD 1 | 12 | #define HAVE_RECORDER_KEYPAD 1 |
9 | 13 | ||
10 | /* define this if you have a real-time clock */ | 14 | /* define this if you have a real-time clock */ |
11 | #define HAVE_RTC 1 | 15 | #define HAVE_RTC 1 |
12 | 16 | ||
17 | #ifndef SIMULATOR | ||
18 | |||
13 | /* Define this if you have a MAS3587F */ | 19 | /* Define this if you have a MAS3587F */ |
14 | #define HAVE_MAS3587F | 20 | #define HAVE_MAS3587F |
15 | 21 | ||
@@ -55,3 +61,4 @@ | |||
55 | /* Define this for LCD backlight available */ | 61 | /* Define this for LCD backlight available */ |
56 | #define HAVE_BACKLIGHT | 62 | #define HAVE_BACKLIGHT |
57 | 63 | ||
64 | #endif /* SIMULATOR */ | ||
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index 1066ece536..d442ea2dd8 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h | |||
@@ -4,12 +4,18 @@ | |||
4 | /* define this if you have a bitmap LCD display */ | 4 | /* define this if you have a bitmap LCD display */ |
5 | #define HAVE_LCD_BITMAP 1 | 5 | #define HAVE_LCD_BITMAP 1 |
6 | 6 | ||
7 | /* LCD dimensions */ | ||
8 | #define LCD_WIDTH 112 | ||
9 | #define LCD_HEIGHT 64 | ||
10 | |||
7 | /* define this if you have a Recorder style 10-key keyboard */ | 11 | /* define this if you have a Recorder style 10-key keyboard */ |
8 | #define HAVE_RECORDER_KEYPAD 1 | 12 | #define HAVE_RECORDER_KEYPAD 1 |
9 | 13 | ||
10 | /* define this if you have a real-time clock */ | 14 | /* define this if you have a real-time clock */ |
11 | #define HAVE_RTC 1 | 15 | #define HAVE_RTC 1 |
12 | 16 | ||
17 | #ifndef SIMULATOR | ||
18 | |||
13 | /* Define this if you have a MAS3587F */ | 19 | /* Define this if you have a MAS3587F */ |
14 | #define HAVE_MAS3587F | 20 | #define HAVE_MAS3587F |
15 | 21 | ||
@@ -64,3 +70,4 @@ | |||
64 | /* Define this for LCD backlight available */ | 70 | /* Define this for LCD backlight available */ |
65 | #define HAVE_BACKLIGHT | 71 | #define HAVE_BACKLIGHT |
66 | 72 | ||
73 | #endif /* SIMULATOR */ | ||
diff --git a/firmware/export/config.h b/firmware/export/config.h index 782668f161..359eadd82d 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -34,6 +34,8 @@ | |||
34 | #include "config-ondiosp.h" | 34 | #include "config-ondiosp.h" |
35 | #elif defined(ARCHOS_ONDIOFM) | 35 | #elif defined(ARCHOS_ONDIOFM) |
36 | #include "config-ondiofm.h" | 36 | #include "config-ondiofm.h" |
37 | #elif defined(IRIVER_H100) | ||
38 | #include "config-h100.h" | ||
37 | #else | 39 | #else |
38 | /* no known platform */ | 40 | /* no known platform */ |
39 | #endif | 41 | #endif |
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 7dda83d8da..21d1f4cc55 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -105,11 +105,6 @@ void lcd_remove_cursor(void); | |||
105 | 105 | ||
106 | #if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) | 106 | #if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) |
107 | #if defined(HAVE_LCD_CHARCELLS) && defined(SIMULATOR) | 107 | #if defined(HAVE_LCD_CHARCELLS) && defined(SIMULATOR) |
108 | #define LCD_WIDTH (4*11*6) /* Display width in pixels */ | ||
109 | #define LCD_HEIGHT (4*16+2*24) /* 4*char + 2*icons */ | ||
110 | #else | ||
111 | #define LCD_WIDTH 112 /* Display width in pixels */ | ||
112 | #define LCD_HEIGHT 64 /* Display height in pixels */ | ||
113 | #endif | 108 | #endif |
114 | 109 | ||
115 | #define DRAW_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] |= (1<<((y)&7)) | 110 | #define DRAW_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] |= (1<<((y)&7)) |
diff --git a/tools/configure b/tools/configure index ef03ed93f3..3bcb656754 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -75,15 +75,15 @@ VERSION=\$(shell date +%y%m%d-%H%M) | |||
75 | all: sim | 75 | all: sim |
76 | 76 | ||
77 | sim: | 77 | sim: |
78 | \$(MAKE) -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) LANGUAGE=\$(LANGUAGE) | 78 | \$(MAKE) -C \$(SIMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) LANGUAGE=\$(LANGUAGE) |
79 | 79 | ||
80 | clean: | 80 | clean: |
81 | \$(MAKE) -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) clean | 81 | \$(MAKE) -C \$(SIMDIR) OBJDIR=\$(THISDIR) clean |
82 | rm -rf rockbox.zip | 82 | rm -rf rockbox.zip |
83 | 83 | ||
84 | tags: | 84 | tags: |
85 | @rm -f TAGS | 85 | @rm -f TAGS |
86 | make -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) tags | 86 | make -C \$(SIMDIR) OBJDIR=\$(THISDIR) tags |
87 | 87 | ||
88 | zip: | 88 | zip: |
89 | \$(TOOLSDIR)/buildzip.pl -r "\$(ROOTDIR)" sim\$(TARGET) | 89 | \$(TOOLSDIR)/buildzip.pl -r "\$(ROOTDIR)" sim\$(TARGET) |
@@ -215,6 +215,7 @@ if [ -z "$archos" ]; then | |||
215 | echo "6 - Neo 35" | 215 | echo "6 - Neo 35" |
216 | echo "7 - Archos Ondio SP" | 216 | echo "7 - Archos Ondio SP" |
217 | echo "8 - Archos Ondio FM" | 217 | echo "8 - Archos Ondio FM" |
218 | echo "9 - Iriver H100" | ||
218 | 219 | ||
219 | getit=`input`; | 220 | getit=`input`; |
220 | 221 | ||
@@ -223,57 +224,46 @@ if [ -z "$archos" ]; then | |||
223 | 1) | 224 | 1) |
224 | archos="player" | 225 | archos="player" |
225 | target="-DARCHOS_PLAYER" | 226 | target="-DARCHOS_PLAYER" |
226 | display="-DHAVE_LCD_CHARCELLS" | ||
227 | keypad="-DHAVE_PLAYER_KEYPAD" | ||
228 | ;; | 227 | ;; |
229 | 228 | ||
230 | 3) | 229 | 3) |
231 | archos="fmrecorder" | 230 | archos="fmrecorder" |
232 | target="-DARCHOS_FMRECORDER" | 231 | target="-DARCHOS_FMRECORDER" |
233 | display="-DHAVE_LCD_BITMAP" | ||
234 | keypad="-DHAVE_RECORDER_KEYPAD" | ||
235 | ;; | 232 | ;; |
236 | 233 | ||
237 | 4) | 234 | 4) |
238 | archos="recorderv2" | 235 | archos="recorderv2" |
239 | target="-DARCHOS_RECORDERV2" | 236 | target="-DARCHOS_RECORDERV2" |
240 | display="-DHAVE_LCD_BITMAP" | ||
241 | keypad="-DHAVE_RECORDER_KEYPAD" | ||
242 | ;; | 237 | ;; |
243 | 238 | ||
244 | 5) | 239 | 5) |
245 | archos="neomstation" | 240 | archos="neomstation" |
246 | target="-DNEO_MSTATION" | 241 | target="-DNEO_MSTATION" |
247 | display="-DHAVE_NEOLCD_CHARCELLS" | ||
248 | keypad="-DHAVE_NEO_KEYPAD" | ||
249 | ;; | 242 | ;; |
250 | 243 | ||
251 | 6) | 244 | 6) |
252 | archos="neo35" | 245 | archos="neo35" |
253 | target="-DNEO_35" | 246 | target="-DNEO_35" |
254 | display="-DHAVE_NEOLCD_CHARCELLS" | ||
255 | keypad="-DHAVE_NEO_KEYPAD" | ||
256 | ;; | 247 | ;; |
257 | 248 | ||
258 | 7) | 249 | 7) |
259 | archos="ondiosp" | 250 | archos="ondiosp" |
260 | target="-DARCHOS_ONDIOSP" | 251 | target="-DARCHOS_ONDIOSP" |
261 | display="-DHAVE_LCD_BITMAP" | ||
262 | keypad="-DHAVE_ONDIO_KEYPAD" | ||
263 | ;; | 252 | ;; |
264 | 253 | ||
265 | 8) | 254 | 8) |
266 | archos="ondiofm" | 255 | archos="ondiofm" |
267 | target="-DARCHOS_ONDIOFM" | 256 | target="-DARCHOS_ONDIOFM" |
268 | display="-DHAVE_LCD_BITMAP" | 257 | ;; |
269 | keypad="-DHAVE_ONDIO_KEYPAD" | 258 | |
259 | 9) | ||
260 | archos="h100" | ||
261 | target="-DIRIVER_H100" | ||
270 | ;; | 262 | ;; |
271 | 263 | ||
272 | *) | 264 | *) |
273 | archos="recorder" | 265 | archos="recorder" |
274 | target="-DARCHOS_RECORDER" | 266 | target="-DARCHOS_RECORDER" |
275 | display="-DHAVE_LCD_BITMAP" | ||
276 | keypad="-DHAVE_RECORDER_KEYPAD" | ||
277 | ;; | 267 | ;; |
278 | 268 | ||
279 | esac | 269 | esac |
diff --git a/uisimulator/common/sim_icons.c b/uisimulator/common/sim_icons.c index e647455402..cb0aad0809 100644 --- a/uisimulator/common/sim_icons.c +++ b/uisimulator/common/sim_icons.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * KIND, either express or implied. | 16 | * KIND, either express or implied. |
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include "config.h" | ||
19 | #ifdef HAVE_LCD_CHARCELLS | 20 | #ifdef HAVE_LCD_CHARCELLS |
20 | 21 | ||
21 | #include "sim_icons.h" | 22 | #include "sim_icons.h" |
diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile index 6534425933..785e590623 100644 --- a/uisimulator/x11/Makefile +++ b/uisimulator/x11/Makefile | |||
@@ -23,13 +23,11 @@ PLAYDIR = $(APPDIR)/player | |||
23 | PLUGINDIR = $(APPDIR)/plugins | 23 | PLUGINDIR = $(APPDIR)/plugins |
24 | SIMCOMMON = ../common | 24 | SIMCOMMON = ../common |
25 | 25 | ||
26 | ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) | 26 | ISPLAYER := $(findstring PLAYER, $(TARGET)) |
27 | MACHINEDIR = $(RECDIR) | 27 | ifeq ($(ISPLAYER), PLAYER) |
28 | # not very nice to set config stuff like this, but... | ||
29 | RTC += -DHAVE_RTC | ||
30 | RADIO += -DHAVE_FMRADIO | ||
31 | else | ||
32 | MACHINEDIR = $(PLAYDIR) | 28 | MACHINEDIR = $(PLAYDIR) |
29 | else | ||
30 | MACHINEDIR = $(RECDIR) | ||
33 | endif | 31 | endif |
34 | 32 | ||
35 | PREVAPPDIR= .. | 33 | PREVAPPDIR= .. |
@@ -60,9 +58,8 @@ LANGUAGE = english | |||
60 | 58 | ||
61 | TARGET = $(OBJDIR)/rockboxui | 59 | TARGET = $(OBJDIR)/rockboxui |
62 | 60 | ||
63 | DEFINES = -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ | 61 | DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ |
64 | $(KEYPAD) $(DISPLAY) -DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) \ | 62 | $(TARGET) -DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) |
65 | $(RTC) $(RADIO) | ||
66 | 63 | ||
67 | # Use this for simulator-only files | 64 | # Use this for simulator-only files |
68 | INCLUDES = -I. -I$(EXPORT) -I$(APPDIR) -I$(MACHINEDIR) -I$(SIMCOMMON) -I$(OBJDIR) -I$(PLUGINDIR)/lib | 65 | INCLUDES = -I. -I$(EXPORT) -I$(APPDIR) -I$(MACHINEDIR) -I$(SIMCOMMON) -I$(OBJDIR) -I$(PLUGINDIR)/lib |
@@ -82,6 +79,7 @@ CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) -W -Wall | |||
82 | APPCFLAGS = $(DEBUG) $(DEFINES) $(APPINCLUDES) -W -Wall | 79 | APPCFLAGS = $(DEBUG) $(DEFINES) $(APPINCLUDES) -W -Wall |
83 | 80 | ||
84 | UNAME := $(shell uname|sed -e "s/CYGWIN.*/CYGWIN/") | 81 | UNAME := $(shell uname|sed -e "s/CYGWIN.*/CYGWIN/") |
82 | EXEFILE = $(OBJDIR)/rockboxui | ||
85 | ifeq ($(UNAME),Linux) | 83 | ifeq ($(UNAME),Linux) |
86 | LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl -ldl | 84 | LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl -ldl |
87 | INCLUDES += -I/usr/X11R6/include | 85 | INCLUDES += -I/usr/X11R6/include |
@@ -93,7 +91,7 @@ ifeq ($(UNAME),CYGWIN) | |||
93 | INCLUDES += -I/usr/X11R6/include | 91 | INCLUDES += -I/usr/X11R6/include |
94 | LIBDIRS = -L/usr/X11R6/lib | 92 | LIBDIRS = -L/usr/X11R6/lib |
95 | DEFINES += -DHAVE_OSS -D_SSIZE_T_ | 93 | DEFINES += -DHAVE_OSS -D_SSIZE_T_ |
96 | TARGET = $(OBJDIR)/rockboxui.exe | 94 | EXEFILE = $(OBJDIR)/rockboxui.exe |
97 | else | 95 | else |
98 | ifeq ($(UNAME),FreeBSD) | 96 | ifeq ($(UNAME),FreeBSD) |
99 | LIBS = -pthread | 97 | LIBS = -pthread |
@@ -117,10 +115,10 @@ else | |||
117 | SOUNDSRC = | 115 | SOUNDSRC = |
118 | endif | 116 | endif |
119 | 117 | ||
120 | ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) | 118 | ifeq ($(ISPLAYER), PLAYER) |
121 | LCDSRSC = lcd-recorder.c sysfont.c font.c | ||
122 | else | ||
123 | LCDSRSC = lcd-playersim.c lcd-player.c lcd-player-charset.c font-player.c | 119 | LCDSRSC = lcd-playersim.c lcd-player.c lcd-player-charset.c font-player.c |
120 | else | ||
121 | LCDSRSC = lcd-recorder.c sysfont.c font.c | ||
124 | endif | 122 | endif |
125 | COMMONSRCS = io.c stubs.c lcd-common.c sim_icons.c fmradio.c | 123 | COMMONSRCS = io.c stubs.c lcd-common.c sim_icons.c fmradio.c |
126 | 124 | ||
@@ -134,7 +132,7 @@ APPS = main.c tree.c menu.c credits.c main_menu.c icons.c language.c \ | |||
134 | misc.c plugin.c playlist_viewer.c bookmark.c filetypes.c \ | 132 | misc.c plugin.c playlist_viewer.c bookmark.c filetypes.c \ |
135 | settings_menu.c sound_menu.c playlist_menu.c | 133 | settings_menu.c sound_menu.c playlist_menu.c |
136 | 134 | ||
137 | ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) | 135 | ifneq ($(ISPLAYER), PLAYER) |
138 | APPS += peakmeter.c bmp.c widgets.c radio.c | 136 | APPS += peakmeter.c bmp.c widgets.c radio.c |
139 | endif | 137 | endif |
140 | 138 | ||
@@ -147,7 +145,7 @@ OBJS := $(OBJDIR)/lang.o $(SRCS:%.c=$(OBJDIR)/%.o) | |||
147 | ROCKS := $(patsubst $(PLUGINDIR)/%.c,$(OBJDIR)/%.rock,$(wildcard $(PLUGINDIR)/*.c)) | 145 | ROCKS := $(patsubst $(PLUGINDIR)/%.c,$(OBJDIR)/%.rock,$(wildcard $(PLUGINDIR)/*.c)) |
148 | PLUGINLIBOBJS := $(patsubst $(PLUGINDIR)/lib/%.c,$(OBJDIR)/%.o,$(wildcard $(PLUGINDIR)/lib/*.c)) | 146 | PLUGINLIBOBJS := $(patsubst $(PLUGINDIR)/lib/%.c,$(OBJDIR)/%.o,$(wildcard $(PLUGINDIR)/lib/*.c)) |
149 | 147 | ||
150 | all: $(TOOLSDIR)/convbdf $(TARGET) $(ROCKS) | 148 | all: $(TOOLSDIR)/convbdf $(EXEFILE) $(ROCKS) |
151 | 149 | ||
152 | $(ROCKS): $(OBJDIR)/libplugin.a | 150 | $(ROCKS): $(OBJDIR)/libplugin.a |
153 | 151 | ||
@@ -155,7 +153,7 @@ $(TOOLSDIR)/convbdf: | |||
155 | $(MAKE) -C $(TOOLSDIR) | 153 | $(MAKE) -C $(TOOLSDIR) |
156 | 154 | ||
157 | clean: | 155 | clean: |
158 | $(RM) $(OBJS) *~ core $(TARGET) $(CLIENTS) $(OBJDIR)/lang.[cho] \ | 156 | $(RM) $(OBJS) *~ core $(EXEFILE) $(CLIENTS) $(OBJDIR)/lang.[cho] \ |
159 | $(OBJDIR)/build.lang $(OBJDIR)/*.o $(OBJDIR)/sysfont.c \ | 157 | $(OBJDIR)/build.lang $(OBJDIR)/*.o $(OBJDIR)/sysfont.c \ |
160 | $(ROCKS) $(OBJDIR)/credits.raw | 158 | $(ROCKS) $(OBJDIR)/credits.raw |
161 | $(RM) -r $(DEPS) | 159 | $(RM) -r $(DEPS) |
@@ -173,50 +171,62 @@ $(OBJDIR)/credits.o: $(APPDIR)/credits.c $(APPDIR)/credits.h $(OBJDIR)/credits.r | |||
173 | $(OBJDIR)/thread.o: ./thread.c | 171 | $(OBJDIR)/thread.o: ./thread.c |
174 | $(OBJDIR)/plugin.o: $(APPDIR)/plugin.c | 172 | $(OBJDIR)/plugin.o: $(APPDIR)/plugin.c |
175 | $(OBJDIR)/build.lang: $(APPDIR)/lang/$(LANGUAGE).lang | 173 | $(OBJDIR)/build.lang: $(APPDIR)/lang/$(LANGUAGE).lang |
176 | perl $(TOOLSDIR)/uplang $(APPDIR)/lang/english.lang $< > $@ | 174 | @echo "UPLANG" |
175 | @perl $(TOOLSDIR)/uplang $(APPDIR)/lang/english.lang $< > $@ | ||
177 | 176 | ||
178 | $(OBJDIR)/lang.o: $(OBJDIR)/build.lang | 177 | $(OBJDIR)/lang.o: $(OBJDIR)/build.lang |
179 | perl -s $(TOOLSDIR)/genlang -p=$(OBJDIR)/lang $< | 178 | @echo GENLANG |
180 | $(CC) $(CFLAGS) -c $(OBJDIR)/lang.c -o $@ | 179 | @perl -s $(TOOLSDIR)/genlang -p=$(OBJDIR)/lang $< |
180 | @echo "CC lang.c" | ||
181 | @$(CC) $(CFLAGS) -c $(OBJDIR)/lang.c -o $@ | ||
181 | 182 | ||
182 | $(OBJDIR)/sysfont.o: $(FIRMWAREDIR)/fonts/clR6x8.bdf | 183 | $(OBJDIR)/sysfont.o: $(FIRMWAREDIR)/fonts/clR6x8.bdf |
183 | $(TOOLSDIR)/convbdf -c -o $(OBJDIR)/sysfont.c $< | 184 | @echo CC $< |
184 | $(CC) $(APPCFLAGS) -c $(OBJDIR)/sysfont.c -o $@ | 185 | @$(TOOLSDIR)/convbdf -c -o $(OBJDIR)/sysfont.c $< |
186 | @$(CC) $(APPCFLAGS) -c $(OBJDIR)/sysfont.c -o $@ | ||
185 | 187 | ||
186 | ################## Plugins ################## | 188 | ################## Plugins ################## |
187 | $(OBJDIR)/libplugin.a: $(PLUGINLIBOBJS) | 189 | $(OBJDIR)/libplugin.a: $(PLUGINLIBOBJS) |
188 | $(AR) ruv $@ $+ | 190 | @echo AR $< |
191 | @$(AR) ru $@ $+ | ||
189 | 192 | ||
190 | $(OBJDIR)/%.o: $(PLUGINDIR)/lib/%.c | 193 | $(OBJDIR)/%.o: $(PLUGINDIR)/lib/%.c |
191 | $(CC) $(CFLAGS) -DPLUGIN -c $< -o $@ | 194 | @echo CC $< |
195 | @$(CC) $(CFLAGS) -DPLUGIN -c $< -o $@ | ||
192 | 196 | ||
193 | $(OBJDIR)/%.rock: $(APPDIR)/plugins/%.c $(APPDIR)/plugin.h | 197 | $(OBJDIR)/%.rock: $(APPDIR)/plugins/%.c $(APPDIR)/plugin.h |
194 | $(CC) $(APPCFLAGS) -DPLUGIN -L$(OBJDIR) -lplugin -shared $< -o $@ | 198 | @echo CC $< |
199 | @$(CC) $(APPCFLAGS) -DPLUGIN -L$(OBJDIR) -lplugin -shared $< -o $@ | ||
200 | @chmod -x $@ | ||
195 | 201 | ||
196 | ################## Patterns for building objects ################## | 202 | ################## Patterns for building objects ################## |
197 | $(OBJDIR)/%.o: ../x11/%.c | 203 | $(OBJDIR)/%.o: ../x11/%.c |
198 | echo x11 | 204 | @echo CC $< |
199 | $(CC) $(CFLAGS) -c $< -o $@ | 205 | @$(CC) $(CFLAGS) -c $< -o $@ |
200 | 206 | ||
201 | $(OBJDIR)/%.o: $(SIMCOMMON)/%.c | 207 | $(OBJDIR)/%.o: $(SIMCOMMON)/%.c |
202 | echo simcommon | 208 | @echo CC $< |
203 | $(CC) $(APPCFLAGS) -c $< -o $@ | 209 | @$(CC) $(APPCFLAGS) -c $< -o $@ |
204 | 210 | ||
205 | $(OBJDIR)/%.o: $(MACHINEDIR)/%.c | 211 | $(OBJDIR)/%.o: $(MACHINEDIR)/%.c |
206 | $(CC) $(APPCFLAGS) -c $< -o $@ | 212 | @echo CC $< |
213 | @$(CC) $(APPCFLAGS) -c $< -o $@ | ||
207 | 214 | ||
208 | $(OBJDIR)/%.o: $(DRIVERS)/%.c | 215 | $(OBJDIR)/%.o: $(DRIVERS)/%.c |
209 | $(CC) $(APPCFLAGS) -c $< -o $@ | 216 | @echo CC $< |
217 | @$(CC) $(APPCFLAGS) -c $< -o $@ | ||
210 | 218 | ||
211 | $(OBJDIR)/%.o: $(FIRMWAREDIR)/%.c | 219 | $(OBJDIR)/%.o: $(FIRMWAREDIR)/%.c |
212 | echo firmware $< | 220 | @echo CC $< |
213 | $(CC) $(APPCFLAGS) -c $< -o $@ | 221 | @$(CC) $(APPCFLAGS) -c $< -o $@ |
214 | 222 | ||
215 | $(OBJDIR)/%.o: $(COMMON)/%.c | 223 | $(OBJDIR)/%.o: $(COMMON)/%.c |
216 | $(CC) $(APPCFLAGS) -c $< -o $@ | 224 | @echo CC $< |
225 | @$(CC) $(APPCFLAGS) -c $< -o $@ | ||
217 | 226 | ||
218 | $(OBJDIR)/%.o: $(APPDIR)/%.c | 227 | $(OBJDIR)/%.o: $(APPDIR)/%.c |
219 | $(CC) $(APPCFLAGS) -c $< -o $@ | 228 | @echo CC $< |
229 | @$(CC) $(APPCFLAGS) -c $< -o $@ | ||
220 | 230 | ||
221 | 231 | ||
222 | ################## Auto-dependencies ################## | 232 | ################## Auto-dependencies ################## |
@@ -239,11 +249,13 @@ $(OBJDIR)/%.o: %.c | |||
239 | $(CC) $(CFLAGS) -c $< -o $@ | 249 | $(CC) $(CFLAGS) -c $< -o $@ |
240 | 250 | ||
241 | ifeq ($(UNAME),CYGWIN) | 251 | ifeq ($(UNAME),CYGWIN) |
242 | $(TARGET): $(OBJS) $(OBJDIR)/libplugin.a | 252 | $(EXEFILE): $(OBJS) $(OBJDIR)/libplugin.a |
243 | $(CC) -g -o $(TARGET) $(OBJS) $(LIBDIRS) $(LDFLAGS) $(LIBS) | 253 | @echo LD $@ |
254 | @$(CC) -g -o $(EXEFILE) $(OBJS) $(LIBDIRS) $(LDFLAGS) $(LIBS) | ||
244 | else | 255 | else |
245 | $(TARGET): $(OBJS) $(OBJDIR)/libplugin.a | 256 | $(EXEFILE): $(OBJS) $(OBJDIR)/libplugin.a |
246 | $(CC) -g -o $(TARGET) $(LIBDIRS) $(LDFLAGS) $(OBJS) $(LIBS) | 257 | @echo LD $@ |
258 | @$(CC) -g -o $(EXEFILE) $(LIBDIRS) $(LDFLAGS) $(OBJS) $(LIBS) | ||
247 | endif | 259 | endif |
248 | 260 | ||
249 | tags: | 261 | tags: |
diff --git a/uisimulator/x11/button-x11.c b/uisimulator/x11/button-x11.c index 30daf6a3b7..951bf730c5 100644 --- a/uisimulator/x11/button-x11.c +++ b/uisimulator/x11/button-x11.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * KIND, either express or implied. | 16 | * KIND, either express or implied. |
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include "config.h" | ||
19 | #include "button.h" | 20 | #include "button.h" |
20 | #include "kernel.h" | 21 | #include "kernel.h" |
21 | #include "debug.h" | 22 | #include "debug.h" |
diff --git a/uisimulator/x11/config.h b/uisimulator/x11/config-x11.h index 1c520cfbac..1c520cfbac 100644 --- a/uisimulator/x11/config.h +++ b/uisimulator/x11/config-x11.h | |||
diff --git a/uisimulator/x11/lcd-x11.c b/uisimulator/x11/lcd-x11.c index 9155a1caf0..bc03d7f822 100644 --- a/uisimulator/x11/lcd-x11.c +++ b/uisimulator/x11/lcd-x11.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <time.h> | 31 | #include <time.h> |
32 | 32 | ||
33 | #include "screenhack.h" | 33 | #include "screenhack.h" |
34 | #include "config.h" | ||
34 | 35 | ||
35 | /* | 36 | /* |
36 | * Specific implementations for X11, using the generic LCD API and data. | 37 | * Specific implementations for X11, using the generic LCD API and data. |
diff --git a/uisimulator/x11/screenhack.c b/uisimulator/x11/screenhack.c index e15f536d6d..052328fa6a 100644 --- a/uisimulator/x11/screenhack.c +++ b/uisimulator/x11/screenhack.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include "vroot.h" | 58 | #include "vroot.h" |
59 | 59 | ||
60 | #include "debug.h" | 60 | #include "debug.h" |
61 | #include "config.h" | ||
61 | 62 | ||
62 | #ifndef isupper | 63 | #ifndef isupper |
63 | # define isupper(c) ((c) >= 'A' && (c) <= 'Z') | 64 | # define isupper(c) ((c) >= 'A' && (c) <= 'Z') |
@@ -412,7 +413,8 @@ int main (int argc, char **argv) | |||
412 | { | 413 | { |
413 | static char geometry[40]; | 414 | static char geometry[40]; |
414 | #ifdef HAVE_LCD_BITMAP | 415 | #ifdef HAVE_LCD_BITMAP |
415 | snprintf(geometry, 40, "*geometry: %dx%d", 120*display_zoom, 68*display_zoom); | 416 | snprintf(geometry, 40, "*geometry: %dx%d", |
417 | LCD_WIDTH*display_zoom+14, LCD_HEIGHT*display_zoom+8); | ||
416 | #else | 418 | #else |
417 | snprintf(geometry, 40, "*geometry: %dx%d", 280*display_zoom, 132*display_zoom); | 419 | snprintf(geometry, 40, "*geometry: %dx%d", 280*display_zoom, 132*display_zoom); |
418 | #endif | 420 | #endif |
diff --git a/uisimulator/x11/screenhack.h b/uisimulator/x11/screenhack.h index f4496d69c5..084f8769bd 100644 --- a/uisimulator/x11/screenhack.h +++ b/uisimulator/x11/screenhack.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <stdlib.h> | 15 | #include <stdlib.h> |
16 | #include <stdbool.h> | 16 | #include <stdbool.h> |
17 | 17 | ||
18 | #include "config.h" | 18 | #include "config-x11.h" |
19 | 19 | ||
20 | #ifdef __hpux | 20 | #ifdef __hpux |
21 | /* Which of the ten billion standards does values.h belong to? | 21 | /* Which of the ten billion standards does values.h belong to? |
diff --git a/uisimulator/x11/utils.h b/uisimulator/x11/utils.h index 284bb86dcd..5045d4aa6d 100644 --- a/uisimulator/x11/utils.h +++ b/uisimulator/x11/utils.h | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifdef HAVE_CONFIG_H | 12 | #ifdef HAVE_CONFIG_H |
13 | # include "config.h" | 13 | # include "config-x11.h" |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #include <stdlib.h> | 16 | #include <stdlib.h> |