summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-08-25 19:00:58 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-08-25 19:00:58 +0000
commit7014faee69119b832451a136c25e63722100b85e (patch)
treea31c20e5dcb920761924aa57a7507d8c33959ea4 /apps/plugins
parentb11767b7ae883f48e9020a7b137ddba5360d31af (diff)
Remove build conditions inside .c plugin files
Rather use the Makefile to specify which files must be built Fix color builds with test plugins enabled (test_scanrate gave an empty .o file) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27886 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/SOURCES16
-rw-r--r--apps/plugins/alpine_cdc.c7
-rw-r--r--apps/plugins/bubbles.c4
-rw-r--r--apps/plugins/calculator.c4
-rw-r--r--apps/plugins/demystify.c3
-rw-r--r--apps/plugins/euroconverter.c4
-rw-r--r--apps/plugins/fire.c3
-rw-r--r--apps/plugins/iriver_flash.c12
-rw-r--r--apps/plugins/jewels.c6
-rw-r--r--apps/plugins/minesweeper.c4
-rw-r--r--apps/plugins/nim.c3
-rw-r--r--apps/plugins/oscilloscope.c2
-rw-r--r--apps/plugins/plasma.c4
-rw-r--r--apps/plugins/pong.c6
-rw-r--r--apps/plugins/ppmviewer.c6
-rw-r--r--apps/plugins/rockblox1d.c6
-rw-r--r--apps/plugins/rockbox_flash.c7
-rw-r--r--apps/plugins/sliding_puzzle.c5
-rw-r--r--apps/plugins/snake.c3
-rw-r--r--apps/plugins/snake2.c4
-rw-r--r--apps/plugins/solitaire.c6
-rw-r--r--apps/plugins/star.c4
-rw-r--r--apps/plugins/starfield.c6
-rw-r--r--apps/plugins/test_fps.c3
-rw-r--r--apps/plugins/test_scanrate.c6
25 files changed, 15 insertions, 119 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index 8ecb2fbd8a..24895fe33f 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -150,10 +150,6 @@ robotfindskitten.c
xobox.c
spacerocks.c
-/* Plugins needing the grayscale lib on low-depth LCDs */
-fire.c
-plasma.c
-
blackjack.c
bounce.c
bubbles.c
@@ -176,6 +172,10 @@ starfield.c
vu_meter.c
wormlet.c
+/* Plugins needing the grayscale lib on low-depth LCDs */
+fire.c
+plasma.c
+
#ifdef HAVE_LCD_COLOR
clix.c
ppmviewer.c
@@ -225,9 +225,12 @@ test_codec.c
test_core_jpeg.c
#endif
test_disk.c
-test_fps.c
#ifdef HAVE_LCD_BITMAP
+test_fps.c
test_gfx.c
+#if LCD_DEPTH < 4 && !defined(SIMULATOR)
+test_scanrate.c
+#endif
#ifndef HAVE_LCD_COLOR
test_grey.c
test_greylib_bitmap_scale.c
@@ -243,9 +246,8 @@ test_resize.c
#if CONFIG_CODEC == SWCODEC
test_sampr.c
#endif
-test_scanrate.c
#ifdef HAVE_TOUCHSCREEN
test_touchscreen.c
#endif
test_viewports.c
-#endif
+#endif /* HAVE_TEST_PLUGINS */
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c
index f6b236895d..3290d5e851 100644
--- a/apps/plugins/alpine_cdc.c
+++ b/apps/plugins/alpine_cdc.c
@@ -33,11 +33,6 @@
#include "plugin.h"
-/* Only build for (correct) target */
-#if CONFIG_CPU==SH7034 && !(CONFIG_STORAGE & STORAGE_MMC)
-
-
-
#ifdef HAVE_LCD_CHARCELLS /* player model */
#define LINES 2
#define COLUMNS 11
@@ -1198,5 +1193,3 @@ enum plugin_status plugin_start(const void* parameter)
/* now go ahead and have fun! */
return (main(parameter)==0) ? PLUGIN_OK : PLUGIN_ERROR;
}
-
-#endif /* CONFIG_CPU==SH7034 && !(CONFIG_STORAGE & STORAGE_MMC) */
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c
index 320fd3e4c6..b35807de47 100644
--- a/apps/plugins/bubbles.c
+++ b/apps/plugins/bubbles.c
@@ -23,8 +23,6 @@
#include "plugin.h"
-#ifdef HAVE_LCD_BITMAP
-
#include "lib/xlcd.h"
#include "lib/pluginlib_actions.h"
#include "lib/fixedpoint.h"
@@ -2566,5 +2564,3 @@ enum plugin_status plugin_start(const void* parameter) {
rb->lcd_setfont(FONT_UI);
return ret;
}
-
-#endif
diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c
index 8068b9c4f3..148f149726 100644
--- a/apps/plugins/calculator.c
+++ b/apps/plugins/calculator.c
@@ -75,7 +75,7 @@ F3: equal to "="
---------------------------------------------------------------------------*/
#include "plugin.h"
-#ifdef HAVE_LCD_BITMAP
+
#include "math.h"
@@ -1767,5 +1767,3 @@ enum plugin_status plugin_start(const void* parameter)
rb->button_clear_queue();
return PLUGIN_OK;
}
-
-#endif /* #ifdef HAVE_LCD_BITMAP */
diff --git a/apps/plugins/demystify.c b/apps/plugins/demystify.c
index 6a8f1eb0c1..6b923a6ed0 100644
--- a/apps/plugins/demystify.c
+++ b/apps/plugins/demystify.c
@@ -24,7 +24,6 @@
#include "plugin.h"
#include "lib/pluginlib_exit.h"
-#ifdef HAVE_LCD_BITMAP
#include "lib/pluginlib_actions.h"
#include "lib/helper.h"
@@ -445,5 +444,3 @@ enum plugin_status plugin_start(const void* parameter)
return ret;
}
-
-#endif /* #ifdef HAVE_LCD_BITMAP */
diff --git a/apps/plugins/euroconverter.c b/apps/plugins/euroconverter.c
index 08dc377368..d7aa61f806 100644
--- a/apps/plugins/euroconverter.c
+++ b/apps/plugins/euroconverter.c
@@ -22,8 +22,6 @@
#include "lib/configfile.h"
#include "lib/pluginlib_exit.h"
-#ifdef HAVE_LCD_CHARCELLS
-
/* Euro converter for the player */
/*
Use:
@@ -599,5 +597,3 @@ enum plugin_status plugin_start(const void* parameter)
}
return PLUGIN_OK;
}
-
-#endif
diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c
index 268a934692..b03f68b670 100644
--- a/apps/plugins/fire.c
+++ b/apps/plugins/fire.c
@@ -23,7 +23,6 @@
#include "plugin.h"
#include "lib/helper.h"
-#ifdef HAVE_LCD_BITMAP
#include "lib/pluginlib_actions.h"
#include "lib/fixedpoint.h"
@@ -382,5 +381,3 @@ enum plugin_status plugin_start(const void* parameter)
return ret;
}
-
-#endif /* #ifdef HAVE_LCD_BITMAP */
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c
index a1ce22c83f..b744eac70f 100644
--- a/apps/plugins/iriver_flash.c
+++ b/apps/plugins/iriver_flash.c
@@ -27,16 +27,10 @@
unsigned char *audiobuf;
ssize_t audiobuf_size;
-#ifdef IRIVER_H100_SERIES
-#define PLATFORM_ID ID_IRIVER_H100
-#else
-#undef PLATFORM_ID /* this platform is not (yet) flashable */
+#ifndef IRIVER_H100_SERIES
+#error this platform is not (yet) flashable
#endif
-#ifdef PLATFORM_ID
-
-
-
#if CONFIG_KEYPAD == IRIVER_H100_PAD
#define KEY1 BUTTON_OFF
#define KEY2 BUTTON_ON
@@ -770,5 +764,3 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_OK;
}
-
-#endif /* ifdef PLATFORM_ID */
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c
index fdf4ff70e5..c636619b43 100644
--- a/apps/plugins/jewels.c
+++ b/apps/plugins/jewels.c
@@ -27,10 +27,6 @@
#include "lib/playback_control.h"
#include "pluginbitmaps/jewels.h"
-#ifdef HAVE_LCD_BITMAP
-
-
-
/* button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define JEWELS_UP BUTTON_UP
@@ -1601,5 +1597,3 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_OK;
}
-
-#endif /* HAVE_LCD_BITMAP */
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c
index 5793ddedf8..3925c2c7bc 100644
--- a/apps/plugins/minesweeper.c
+++ b/apps/plugins/minesweeper.c
@@ -21,8 +21,6 @@
#include "plugin.h"
-#ifdef HAVE_LCD_BITMAP
-
#include "lib/playback_control.h"
@@ -926,5 +924,3 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_OK;
}
-
-#endif
diff --git a/apps/plugins/nim.c b/apps/plugins/nim.c
index 07e41ffe3e..3a3a870dad 100644
--- a/apps/plugins/nim.c
+++ b/apps/plugins/nim.c
@@ -21,8 +21,6 @@
#include "plugin.h"
#include "lib/pluginlib_exit.h"
-#ifdef HAVE_LCD_CHARCELLS
-
/* NIM game for the player
Rules of nim game
@@ -290,4 +288,3 @@ enum plugin_status plugin_start(const void* parameter)
}
return PLUGIN_OK;
}
-#endif
diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c
index e9c21ff119..10966c9ebc 100644
--- a/apps/plugins/oscilloscope.c
+++ b/apps/plugins/oscilloscope.c
@@ -25,7 +25,6 @@
#include "lib/helper.h"
#include "lib/pluginlib_exit.h"
-#ifdef HAVE_LCD_BITMAP
#include "lib/xlcd.h"
#include "lib/configfile.h"
@@ -916,4 +915,3 @@ enum plugin_status plugin_start(const void* parameter)
}
return PLUGIN_OK;
}
-#endif /* HAVE_LCD_BITMAP */
diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c
index 35bc03ba1f..58d903cb06 100644
--- a/apps/plugins/plasma.c
+++ b/apps/plugins/plasma.c
@@ -29,8 +29,6 @@
#include "lib/pluginlib_actions.h"
#include "lib/pluginlib_exit.h"
-#ifdef HAVE_LCD_BITMAP
-
#ifndef HAVE_LCD_COLOR
#include "lib/grey.h"
#endif
@@ -326,5 +324,3 @@ enum plugin_status plugin_start(const void* parameter)
#endif
return main();
}
-
-#endif /* HAVE_LCD_BITMAP */
diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c
index 8a41d9eeb2..83a8e48228 100644
--- a/apps/plugins/pong.c
+++ b/apps/plugins/pong.c
@@ -20,10 +20,6 @@
****************************************************************************/
#include "plugin.h"
-#ifdef HAVE_LCD_BITMAP
-
-
-
#define PAD_HEIGHT LCD_HEIGHT / 6 /* Recorder: 10 iRiver: 21 */
#define PAD_WIDTH LCD_WIDTH / 50 /* Recorder: 2 iRiver: 2 */
@@ -587,5 +583,3 @@ enum plugin_status plugin_start(const void* parameter)
return (game == 0) ? PLUGIN_OK : PLUGIN_USB_CONNECTED;
}
-
-#endif /* HAVE_LCD_BITMAP */
diff --git a/apps/plugins/ppmviewer.c b/apps/plugins/ppmviewer.c
index 035fffe92a..e138692aef 100644
--- a/apps/plugins/ppmviewer.c
+++ b/apps/plugins/ppmviewer.c
@@ -22,10 +22,6 @@
#include "plugin.h"
#include "lib/pluginlib_bmp.h"
-#if defined(HAVE_LCD_COLOR)
-
-
-
/* Magic constants. */
#define PPM_MAGIC1 'P'
#define PPM_MAGIC2 '3'
@@ -357,5 +353,3 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_OK;
}
-
-#endif
diff --git a/apps/plugins/rockblox1d.c b/apps/plugins/rockblox1d.c
index 1306cc9932..6a175e5bb5 100644
--- a/apps/plugins/rockblox1d.c
+++ b/apps/plugins/rockblox1d.c
@@ -22,11 +22,6 @@
#include "plugin.h"
-
-
-
-#ifdef HAVE_LCD_BITMAP
-
#if CONFIG_KEYPAD == RECORDER_PAD
#define ONEDROCKBLOX_DOWN BUTTON_PLAY
#define ONEDROCKBLOX_QUIT BUTTON_OFF
@@ -323,4 +318,3 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_OK;
}
-#endif
diff --git a/apps/plugins/rockbox_flash.c b/apps/plugins/rockbox_flash.c
index f1c4f537da..9da3f63c8b 100644
--- a/apps/plugins/rockbox_flash.c
+++ b/apps/plugins/rockbox_flash.c
@@ -23,10 +23,6 @@
****************************************************************************/
#include "plugin.h"
-#if (CONFIG_CPU == SH7034) /* Only for SH targets */
-
-
-
/* define DUMMY if you only want to "play" with the UI, does no harm */
/* #define DUMMY */
@@ -957,6 +953,3 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_OK;
}
-
-
-#endif /* SH-target */
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c
index 4d7d2c00ca..6ea04d5057 100644
--- a/apps/plugins/sliding_puzzle.c
+++ b/apps/plugins/sliding_puzzle.c
@@ -20,9 +20,6 @@
****************************************************************************/
#include "plugin.h"
-#ifdef HAVE_LCD_BITMAP
-
-
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define PUZZLE_QUIT BUTTON_OFF
@@ -818,5 +815,3 @@ enum plugin_status plugin_start(
return puzzle_loop();
}
-
-#endif
diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c
index 00a43e5cc7..5ae941a655 100644
--- a/apps/plugins/snake.c
+++ b/apps/plugins/snake.c
@@ -33,7 +33,7 @@ dir is the current direction of the snake - 0=up, 1=right, 2=down, 3=left;
*/
#include "plugin.h"
-#ifdef HAVE_LCD_BITMAP
+
#include "lib/configfile.h"
#include "lib/highscore.h"
#include "lib/playback_control.h"
@@ -529,4 +529,3 @@ enum plugin_status plugin_start(const void* parameter)
highscore_save(SCORE_FILE, highscores, NUM_SCORES);
return PLUGIN_OK;
}
-#endif
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c
index 3fbf40b8f9..eb101cf1bd 100644
--- a/apps/plugins/snake2.c
+++ b/apps/plugins/snake2.c
@@ -30,7 +30,7 @@ Head and Tail are stored
*/
#include "plugin.h"
-#ifdef HAVE_LCD_BITMAP
+
#include "lib/highscore.h"
#include "lib/playback_control.h"
@@ -1525,5 +1525,3 @@ enum plugin_status plugin_start(const void* parameter)
return (quit==1) ? PLUGIN_OK : PLUGIN_USB_CONNECTED;
}
-
-#endif
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 1d2535f657..dc2bd79420 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -26,10 +26,6 @@
#include "button.h"
#include "lcd.h"
-#ifdef HAVE_LCD_BITMAP
-
-
-
#define min(a,b) (a<b?a:b)
/**
@@ -1928,5 +1924,3 @@ enum plugin_status plugin_start(const void* parameter )
/* Exit the plugin */
return ( result == SOLITAIRE_USB ) ? PLUGIN_USB_CONNECTED : PLUGIN_OK;
}
-
-#endif
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index c0f099775f..e5d8259d88 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -19,7 +19,7 @@
*
****************************************************************************/
#include "plugin.h"
-#ifdef HAVE_LCD_BITMAP
+
#include "lib/display_text.h"
#include "lib/playback_control.h"
@@ -1162,5 +1162,3 @@ enum plugin_status plugin_start(const void* parameter)
/* display choice menu */
return star_menu();
}
-
-#endif
diff --git a/apps/plugins/starfield.c b/apps/plugins/starfield.c
index 09f58da1f6..7f17970a84 100644
--- a/apps/plugins/starfield.c
+++ b/apps/plugins/starfield.c
@@ -21,10 +21,6 @@
#include "lib/helper.h"
#include "lib/pluginlib_exit.h"
-#ifdef HAVE_LCD_BITMAP /* and also not for the Player */
-
-
-
/******************************* Globals ***********************************/
/* Key assignement */
@@ -524,5 +520,3 @@ enum plugin_status plugin_start(const void* parameter)
return ret;
}
-
-#endif /* #ifdef HAVE_LCD_BITMAP */
diff --git a/apps/plugins/test_fps.c b/apps/plugins/test_fps.c
index 80a8d88104..f57f45b000 100644
--- a/apps/plugins/test_fps.c
+++ b/apps/plugins/test_fps.c
@@ -22,8 +22,6 @@
#include "lib/helper.h"
#include "lib/grey.h"
-#ifdef HAVE_LCD_BITMAP
-
PLUGIN_IRAM_DECLARE
#if (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \
@@ -385,4 +383,3 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_OK;
}
-#endif
diff --git a/apps/plugins/test_scanrate.c b/apps/plugins/test_scanrate.c
index 81d8248013..d29544fb33 100644
--- a/apps/plugins/test_scanrate.c
+++ b/apps/plugins/test_scanrate.c
@@ -21,10 +21,6 @@
#include "plugin.h"
-#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && !defined(SIMULATOR)
-
-
-
#if (CONFIG_KEYPAD == RECORDER_PAD) || (CONFIG_KEYPAD == ONDIO_PAD) \
|| (CONFIG_KEYPAD == IRIVER_H100_PAD)
#define SCANRATE_DONE BUTTON_OFF
@@ -245,5 +241,3 @@ enum plugin_status plugin_start(const void* parameter)
(void)parameter;
return plugin_main();
}
-
-#endif