diff options
author | Barry Wardell <rockbox@barrywardell.net> | 2006-09-29 16:15:11 +0000 |
---|---|---|
committer | Barry Wardell <rockbox@barrywardell.net> | 2006-09-29 16:15:11 +0000 |
commit | 64f949f2954db85968850f6e157e5c3b10df6b7d (patch) | |
tree | 14003f384ae848d98473494a74618609ddf04c5f /apps/plugins | |
parent | b692fb11b3bb081f51a7bab7351ccbfc78df6617 (diff) |
Allow UI simulator to be build on OS (Slightly updated version of FS5767)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11094 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/chessbox/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/databox/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/doom/Makefile | 15 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/Makefile | 9 | ||||
-rw-r--r-- | apps/plugins/pacbox/Makefile | 9 | ||||
-rw-r--r-- | apps/plugins/rockboy/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/searchengine/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/sudoku/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/zxbox/Makefile | 7 |
10 files changed, 80 insertions, 20 deletions
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile index 0b2974f565..adc7895da0 100644 --- a/apps/plugins/Makefile +++ b/apps/plugins/Makefile @@ -13,6 +13,12 @@ INCLUDES = $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/c CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN +ifeq ($(UNAME), Darwin) +SHARED_FLAG=-dynamiclib -Wl,-single_module +else +SHARED_FLAG=-shared +endif + ifdef APPEXTRA INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) endif @@ -96,7 +102,7 @@ ifeq ($(SIMVER), x11) $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) @echo "LD "`basename $@` - $(SILENT)$(CC) $(CFLAGS) -shared $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ + $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -112,7 +118,7 @@ ifeq ($(SIMVER), sdl) $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) @echo "LD "`basename $@` - $(SILENT)$(CC) $(CFLAGS) -shared $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ + $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 diff --git a/apps/plugins/chessbox/Makefile b/apps/plugins/chessbox/Makefile index 66381bea12..9d13a2e12d 100644 --- a/apps/plugins/chessbox/Makefile +++ b/apps/plugins/chessbox/Makefile @@ -12,6 +12,12 @@ INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR) CFLAGS = $(GCCOPTS) -O2 $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN +ifeq ($(UNAME), Darwin) +SHARED_FLAG=-dynamiclib -Wl,-single_module +else +SHARED_FLAG=-shared +endif + ifdef APPEXTRA INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) endif @@ -55,7 +61,7 @@ ifeq ($(SIMVER), x11) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -71,7 +77,7 @@ ifeq ($(SIMVER), sdl) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 diff --git a/apps/plugins/databox/Makefile b/apps/plugins/databox/Makefile index 507a861f9b..dba5597c8d 100644 --- a/apps/plugins/databox/Makefile +++ b/apps/plugins/databox/Makefile @@ -12,6 +12,12 @@ INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR) CFLAGS = $(INCLUDES) $(GCCOPTS) -O3 $(TARGET) $(EXTRA_DEFINES) \ -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN +ifeq ($(UNAME), Darwin) +SHARED_FLAG=-dynamiclib -Wl,-single_module +else +SHARED_FLAG=-shared +endif + ifdef APPEXTRA INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) endif @@ -46,7 +52,7 @@ ifeq ($(SIMVER), x11) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -62,7 +68,7 @@ ifeq ($(SIMVER), sdl) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 diff --git a/apps/plugins/doom/Makefile b/apps/plugins/doom/Makefile index b79f5be7b0..a94a26a544 100644 --- a/apps/plugins/doom/Makefile +++ b/apps/plugins/doom/Makefile @@ -3,7 +3,10 @@ # $Id$ # # $Log$ -# Revision 1.4 2006/07/27 13:27:19 linus +# Revision 1.5 2006/09/29 16:15:08 barrywardell +# Allow UI simulator to be build on OS (Slightly updated version of FS5767) +# +# Revision 1.4 2006-07-27 13:27:19 linus # Moved the X5 button driver to the target tree # # Revision 1.3 2006-04-14 21:07:56 kkurbjun @@ -23,6 +26,12 @@ CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN \ -Wno-strict-prototypes -O2 $(PROFILE_OPTS) +ifeq ($(UNAME), Darwin) +SHARED_FLAG=-dynamiclib -Wl,-single_module +else +SHARED_FLAG=-shared +endif + ifdef APPEXTRA INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) endif @@ -85,7 +94,7 @@ ifeq ($(SIMVER), x11) $(OUTPUT): $(OBJS) @echo "LD $@" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -101,7 +110,7 @@ ifeq ($(SIMVER), sdl) $(OUTPUT): $(OBJS) @echo "LD $@" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 diff --git a/apps/plugins/mpegplayer/Makefile b/apps/plugins/mpegplayer/Makefile index 46ea76633b..5982884700 100644 --- a/apps/plugins/mpegplayer/Makefile +++ b/apps/plugins/mpegplayer/Makefile @@ -12,6 +12,11 @@ INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR) CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN +ifeq ($(UNAME), Darwin) +SHARED_FLAG=-dynamiclib -Wl,-single_module +else +SHARED_FLAG=-shared +endif ifdef APPEXTRA INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) @@ -50,7 +55,7 @@ ifeq ($(SIMVER), x11) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -66,7 +71,7 @@ ifeq ($(SIMVER), sdl) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 diff --git a/apps/plugins/pacbox/Makefile b/apps/plugins/pacbox/Makefile index 4a5442c25f..fbff8b5109 100644 --- a/apps/plugins/pacbox/Makefile +++ b/apps/plugins/pacbox/Makefile @@ -12,6 +12,11 @@ INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR) CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN +ifeq ($(UNAME), Darwin) +SHARED_FLAG=-dynamiclib -Wl,-single_module +else +SHARED_FLAG=-shared +endif ifdef APPEXTRA INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) @@ -50,7 +55,7 @@ ifeq ($(SIMVER), x11) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -66,7 +71,7 @@ ifeq ($(SIMVER), sdl) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 diff --git a/apps/plugins/rockboy/Makefile b/apps/plugins/rockboy/Makefile index 39e684e143..91fdf67c31 100644 --- a/apps/plugins/rockboy/Makefile +++ b/apps/plugins/rockboy/Makefile @@ -16,6 +16,12 @@ ifdef APPEXTRA INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) endif +ifeq ($(UNAME), Darwin) +SHARED_FLAG=-dynamiclib -Wl,-single_module +else +SHARED_FLAG=-shared +endif + LINKFILE := $(OBJDIR)/link.lds DEPFILE = $(OBJDIR)/dep-rockboy SRC = cpu.c emu.c events.c exports.c fastmem.c hw.c lcd.c lcdc.c loader.c \ @@ -62,7 +68,7 @@ ifeq ($(SIMVER), x11) $(OUTPUT): $(OBJS) @echo "LD $@" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -78,7 +84,7 @@ ifeq ($(SIMVER), sdl) $(OUTPUT): $(OBJS) @echo "LD $@" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 diff --git a/apps/plugins/searchengine/Makefile b/apps/plugins/searchengine/Makefile index 92e9f03991..d397f315f4 100644 --- a/apps/plugins/searchengine/Makefile +++ b/apps/plugins/searchengine/Makefile @@ -16,6 +16,12 @@ ifdef APPEXTRA INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) endif +ifeq ($(UNAME), Darwin) +SHARED_FLAG=-dynamiclib -Wl,-single_module +else +SHARED_FLAG=-shared +endif + LINKFILE := $(OBJDIR)/link.lds DEPFILE = $(OBJDIR)/dep-searchengine SRC = searchengine.c parser.c token.c dbinterface.c @@ -46,7 +52,7 @@ ifeq ($(SIMVER), x11) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -62,7 +68,7 @@ ifeq ($(SIMVER), sdl) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 diff --git a/apps/plugins/sudoku/Makefile b/apps/plugins/sudoku/Makefile index 8a1d8b189d..713d31bcb2 100644 --- a/apps/plugins/sudoku/Makefile +++ b/apps/plugins/sudoku/Makefile @@ -17,6 +17,12 @@ ifdef APPEXTRA INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) endif +ifeq ($(UNAME), Darwin) +SHARED_FLAG=-dynamiclib -Wl,-single_module +else +SHARED_FLAG=-shared +endif + LINKFILE := $(OBJDIR)/link.lds DEPFILE = $(OBJDIR)/dep-sudoku @@ -53,7 +59,7 @@ ifeq ($(SIMVER), x11) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -69,7 +75,7 @@ ifeq ($(SIMVER), sdl) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 diff --git a/apps/plugins/zxbox/Makefile b/apps/plugins/zxbox/Makefile index cb78ce961b..8668c3f4e7 100644 --- a/apps/plugins/zxbox/Makefile +++ b/apps/plugins/zxbox/Makefile @@ -12,6 +12,11 @@ INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN $(OPT_FLAGS) $(PROFILE_OPTS) +ifeq ($(UNAME), Darwin) +SHARED_FLAG=-dynamiclib -Wl,-single_module +else +SHARED_FLAG=-shared +endif ifdef APPEXTRA INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) @@ -59,7 +64,7 @@ ifeq ($(SIMVER), sdl) $(OUTPUT): $(OBJS) @echo "LD $<" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |