Move button and lcd files to the target tree. uisimulator/sdl has no code anymore
authorThomas Martitz <thomas.martitz@student.htw-berlin.de>
Fri, 14 May 2010 15:30:06 +0000 (14 17:30 +0200)
committerThomas Martitz <thomas.martitz@student.htw-berlin.de>
Fri, 14 May 2010 15:30:06 +0000 (14 17:30 +0200)
18 files changed:
firmware/SOURCES
firmware/target/hosted/sdl/button-sdl.c [moved from uisimulator/sdl/button.c with 99% similarity]
firmware/target/hosted/sdl/button-sdl.h [moved from uisimulator/sdl/button-sdl.h with 83% similarity]
firmware/target/hosted/sdl/kernel-sdl.c
firmware/target/hosted/sdl/lcd-bitmap.c [moved from uisimulator/sdl/lcd-bitmap.c with 99% similarity]
firmware/target/hosted/sdl/lcd-bitmap.h [moved from uisimulator/sdl/lcd-bitmap.h with 100% similarity]
firmware/target/hosted/sdl/lcd-charcells.c [moved from uisimulator/sdl/lcd-charcells.c with 99% similarity]
firmware/target/hosted/sdl/lcd-charcells.h [moved from uisimulator/sdl/lcd-charcells.h with 100% similarity]
firmware/target/hosted/sdl/lcd-remote-bitmap.c [moved from uisimulator/sdl/lcd-remote-bitmap.c with 99% similarity]
firmware/target/hosted/sdl/lcd-remote-bitmap.h [moved from uisimulator/sdl/lcd-remote-bitmap.h with 100% similarity]
firmware/target/hosted/sdl/lcd-sdl.c [moved from uisimulator/sdl/lcd-sdl.c with 98% similarity]
firmware/target/hosted/sdl/lcd-sdl.h [moved from uisimulator/sdl/lcd-sdl.h with 100% similarity]
firmware/target/hosted/sdl/sim-ui-defines.h [moved from uisimulator/sdl/uisdl.h with 99% similarity]
firmware/target/hosted/sdl/system-sdl.c
uisimulator/sdl/Makefile [deleted file]
uisimulator/sdl/README [deleted file]
uisimulator/sdl/SOURCES [deleted file]
uisimulator/uisimulator.make

index b9611e0..2d65280 100644 (file)
@@ -19,7 +19,17 @@ thread.c
 timer.c
 #endif /* SIMULATOR */
 #ifdef HAVE_SDL
+target/hosted/sdl/button-sdl.c
 target/hosted/sdl/kernel-sdl.c
+#ifdef HAVE_LCD_BITMAP
+target/hosted/sdl/lcd-bitmap.c
+#elif defined(HAVE_LCD_CHARCELLS)
+target/hosted/sdl/lcd-charcells.c
+#endif
+#ifdef HAVE_REMOTE_LCD
+target/hosted/sdl/lcd-remote-bitmap.c
+#endif
+target/hosted/sdl/lcd-sdl.c
 target/hosted/sdl/system-sdl.c
 target/hosted/sdl/thread-sdl.c
 target/hosted/sdl/timer-sdl.c
similarity index 99%
rename from uisimulator/sdl/button.c
rename to firmware/target/hosted/sdl/button-sdl.c
index d54a1e6..a32872d 100644 (file)
@@ -20,7 +20,7 @@
  ****************************************************************************/
 
 #include <math.h>
-#include "uisdl.h"
+#include "sim-ui-defines.h"
 #include "lcd-charcells.h"
 #include "lcd-remote.h"
 #include "config.h"
@@ -62,6 +62,8 @@ int remote_type(void)
 }
 #endif
 
+static int xy2button(int x, int y);
+
 struct event_queue button_queue;
 
 static int btn = 0;    /* Hopefully keeps track of currently pressed keys... */
@@ -1546,6 +1548,10 @@ void button_init_device(void)
 /* Run sim with --mapping to get coordinates      */
 /* or --debugbuttons to check                     */
 /* The First matching button is returned          */
+struct button_map {
+    int button, x, y, radius;
+    char *description;
+};
 
 #ifdef SANSA_FUZE
 struct button_map bm[] = {
@@ -1997,7 +2003,8 @@ struct button_map bm[] = {
 };
 #endif
 
-int xy2button( int x, int y) {
+static int xy2button( int x, int y)
+{
     int i;
     extern bool debug_buttons;
     
similarity index 83%
rename from uisimulator/sdl/button-sdl.h
rename to firmware/target/hosted/sdl/button-sdl.h
index ab9d756..75a68c4 100644 (file)
  ****************************************************************************/
 
 
-#ifndef _BUTTON_SDL_H_
-#define _BUTTON_SDL_H_
+#ifndef __BUTTON_SDL_H__
+#define __BUTTON_SDL_H__
 
 #include <stdbool.h>
 #include "config.h"
-#include "button-target.h"
 
-#undef HAVE_LCD_FLIP
-struct button_map {
-    int button, x, y, radius;
-    char *description;
-};
-
-int  xy2button( int x, int y);
 bool button_hold(void);
 void button_init_device(void);
-#endif
+
+#endif /* __BUTTON_SDL_H__ */
index 0de209d..d796921 100644 (file)
@@ -25,7 +25,6 @@
 #include <SDL_thread.h>
 #include "memory.h"
 #include "system-sdl.h"
-#include "uisdl.h"
 #include "thread-sdl.h"
 #include "kernel.h"
 #include "thread.h"
similarity index 99%
rename from uisimulator/sdl/lcd-bitmap.c
rename to firmware/target/hosted/sdl/lcd-bitmap.c
index 298086d..6dfbfff 100644 (file)
@@ -20,7 +20,7 @@
  ****************************************************************************/
 
 #include "debug.h"
-#include "uisdl.h"
+#include "sim-ui-defines.h"
 #include "system.h"
 #include "lcd-sdl.h"
 #include "screendump.h"
similarity index 99%
rename from uisimulator/sdl/lcd-charcells.c
rename to firmware/target/hosted/sdl/lcd-charcells.c
index 05513ab..8b73ff7 100644 (file)
@@ -29,7 +29,7 @@
 #include <fcntl.h>
 
 #include "lcd-playersim.h"
-#include "uisdl.h"
+#include "sim-ui-defines.h"
 #include "lcd-sdl.h"
 
 /* can't include file.h here */
similarity index 99%
rename from uisimulator/sdl/lcd-remote-bitmap.c
rename to firmware/target/hosted/sdl/lcd-remote-bitmap.c
index c44e476..30811cf 100644 (file)
@@ -19,7 +19,7 @@
  *
  ****************************************************************************/
 
-#include "uisdl.h"
+#include "sim-ui-defines.h"
 #include "lcd-sdl.h"
 #include "lcd-remote-bitmap.h"
 #include "screendump.h"
similarity index 98%
rename from uisimulator/sdl/lcd-sdl.c
rename to firmware/target/hosted/sdl/lcd-sdl.c
index f1ffe8a..15e4ba9 100644 (file)
@@ -19,8 +19,9 @@
  *
  ****************************************************************************/
 
+#include <SDL.h>
 #include "lcd-sdl.h"
-#include "uisdl.h"
+#include "sim-ui-defines.h"
 #include "system.h" /* for MIN() and MAX() */
 
 int display_zoom = 1;
similarity index 99%
rename from uisimulator/sdl/uisdl.h
rename to firmware/target/hosted/sdl/sim-ui-defines.h
index cb20bae..567a618 100644 (file)
 #define UI_LCD_POSX                 101
 #define UI_LCD_POSY                 195
 
-#else
+#elif defined(SIMULATOR)
 #error no UI defines
 #endif
 
index c4e5d85..693e8d1 100644 (file)
@@ -25,7 +25,7 @@
 #include <setjmp.h>
 #include "system-sdl.h"
 #include "thread-sdl.h"
-#include "uisdl.h"
+#include "sim-ui-defines.h"
 #include "lcd-sdl.h"
 #ifdef HAVE_LCD_BITMAP
 #include "lcd-bitmap.h"
diff --git a/uisimulator/sdl/Makefile b/uisimulator/sdl/Makefile
deleted file mode 100644 (file)
index dc76b35..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-############################################################################
-#             __________               __   ___.                  
-#   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___  
-#   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /  
-#   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <   
-#   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
-#                     \/            \/     \/    \/            \/ 
-# $Id$
-#
-# Copyright (C) 2002, 2008 by Daniel Stenberg <daniel@haxx.se>
-#
-# All files in this archive are subject to the GNU General Public License.
-# See the file COPYING in the source tree root for full license agreement.
-#
-# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-# KIND, either express or implied.
-#
-############################################################################
-
-SIMCOMMON = ../common
-
-DEPFILE = $(OBJDIR)/dep-sim
-
-RM = rm -f
-DEBUG = -g
-
-# Use this for simulator-only files
-INCLUDES = -I. -I$(SIMCOMMON) -I$(OBJDIR) $(TARGET_INC) -I$(FIRMDIR)/export \
--I$(APPSDIR) -I$(BUILDDIR)
-
-# This sets up 'SRC' based on the files mentioned in SOURCES
-include $(TOOLSDIR)/makesrc.inc
-
-OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
-
-DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \
-$(TARGET) -DAPPSVERSION=\"$(VERSION)\" -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES) 
-
-SOURCES = $(SRC)
-
-DIRS = .
-
-CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) $(GCCOPTS) -W -Wall
-
-OUTFILE = $(BUILDDIR)/libsim.a
-
-all: $(OUTFILE)
-
-include $(TOOLSDIR)/make.inc
-
-$(OUTFILE): $(OBJS) $(BUILDDIR)/UI256.bmp
-       $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $(OBJS) >/dev/null 2>&1
-       $(SILENT)$(RANLIB) $@
-
-clean:
-       $(call PRINTS,cleaning sim)$(RM) $(OBJS) *~ core $(OUTFILE) $(DEPFILE) \
-       $(BUILDDIR)/UI256.bmp $(DEPFILE)
-       $(SILENT)$(MAKE) -C $(SIMCOMMON) clean
-
-################## Specific dependencies ##################
-$(BUILDDIR)/UI256.bmp: UI-$(MODELNAME).bmp
-       $(call PRINTS,UI)cp $< $@
-
--include $(DEPFILE)
diff --git a/uisimulator/sdl/README b/uisimulator/sdl/README
deleted file mode 100644 (file)
index 0a293f6..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-To build:
-
- $ ../tools/configure
- [answer questions]
- $ make
- $ ./rockboxui
diff --git a/uisimulator/sdl/SOURCES b/uisimulator/sdl/SOURCES
deleted file mode 100644 (file)
index 19d9718..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-button.c
-#ifdef HAVE_LCD_BITMAP
-lcd-bitmap.c
-#elif defined(HAVE_LCD_CHARCELLS)
-lcd-charcells.c
-#endif
-#ifdef HAVE_REMOTE_LCD
-lcd-remote-bitmap.c
-#endif
-lcd-sdl.c
index 05b973f..86fcb2a 100644 (file)
@@ -12,7 +12,6 @@ INCLUDES += -I$(ROOTDIR)/uisimulator/sdl -I$(ROOTDIR)/uisimulator/common \
 
 SIMFLAGS += $(INCLUDES) $(DEFINES) -DHAVE_CONFIG_H $(GCCOPTS)
 
-SIMSRC += $(call preprocess, $(ROOTDIR)/uisimulator/sdl/SOURCES)
 SIMSRC += $(call preprocess, $(ROOTDIR)/uisimulator/common/SOURCES)
 SIMOBJ = $(call c2obj,$(SIMSRC))
 OTHER_SRC += $(SIMSRC)