diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-05-07 22:41:17 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-05-07 22:41:17 +0000 |
commit | b8a23f9e4980e6a041d750c325ab2845aea8488a (patch) | |
tree | d10400e99208595638f13e7fe3b279274a173e56 /apps/plugins | |
parent | d23afcd4f4ad72b1c2c087055a9ba4457f2646cd (diff) |
Fixed makefiles for autoconf.g include.
Fixed build output look in several Makefiles
Fixed code to include autoconf.h
Fixed code to use ROCKBOX_*_ENDIAN instead of previous attempts.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6421 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/Makefile | 39 | ||||
-rw-r--r-- | apps/plugins/a52towav.c | 11 | ||||
-rw-r--r-- | apps/plugins/lib/Makefile | 4 | ||||
-rw-r--r-- | apps/plugins/mpc2wav.c | 6 | ||||
-rw-r--r-- | apps/plugins/rockboy/Makefile | 26 | ||||
-rw-r--r-- | apps/plugins/rockboy/defs.h | 2 | ||||
-rw-r--r-- | apps/plugins/rockboy/fastmem.c | 4 | ||||
-rw-r--r-- | apps/plugins/rockboy/rockmacros.h | 5 | ||||
-rw-r--r-- | apps/plugins/rockboy/save.c | 2 | ||||
-rw-r--r-- | apps/plugins/searchengine/Makefile | 32 |
10 files changed, 61 insertions, 70 deletions
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile index 38cd723ae0..23bc12d71a 100644 --- a/apps/plugins/Makefile +++ b/apps/plugins/Makefile @@ -8,7 +8,7 @@ # INCLUDES = -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \ - -I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib + -I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib -I$(BUILDDIR) CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ -DMEM=${MEMORYSIZE} -DPLUGIN @@ -48,15 +48,15 @@ endif .PHONY: $(SUBDIRS) -all: $(OBJDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE) +all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE) ifndef SIMVER -$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(OBJDIR)/libplugin.a - @echo "LD $@" - @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(OBJDIR) $(CODECLIBS) -lplugin -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$*.map +$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(BUILDDIR)/libplugin.a + @echo "LD "`basename $@` + @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(BUILDDIR) $(CODECLIBS) -lplugin -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$*.map $(OBJDIR)/%.rock : $(OBJDIR)/%.elf - @echo "OBJCOPY $<" + @echo "OBJCOPY "`basename $@` @$(OC) -O binary $< $@ else @@ -64,9 +64,9 @@ ifeq ($(SIMVER), x11) ################################################### # This is the X11 simulator version -$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(OBJDIR)/libplugin.a - @echo "LD $@" - @$(CC) $(CFLAGS) -shared $< -L$(OBJDIR) $(CODECLIBS) -lplugin -o $@ +$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a + @echo "LD "`basename $@` + @$(CC) $(CFLAGS) -shared $< -L$(BUILDDIR) $(CODECLIBS) -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 @@ -81,11 +81,11 @@ else # end of x11-simulator DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin -$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(OBJDIR)/libplugin.a - @echo "DLL $@" +$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a + @echo "DLL "`basename $@` @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $< - @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(OBJDIR)/libplugin.a \ - $(patsubst -l%,$(OBJDIR)/lib%.a,$(CODECLIBS)) -o $@ + @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(BUILDDIR)/libplugin.a \ + $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) -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 @@ -99,9 +99,10 @@ endif # end of simulator section include $(TOOLSDIR)/make.inc -$(OBJDIR)/libplugin.a: +$(BUILDDIR)/libplugin.a: @echo "MAKE in lib" - @$(MAKE) -C lib TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEMORYSIZE} + @mkdir -p $(OBJDIR)/lib + @$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib # MEM should be passed on to this makefile with the chosen memory size given # in number of MB @@ -112,14 +113,14 @@ $(LINKFILE): $(LDS) $(SUBDIRS): @echo "MAKE in $@" @mkdir -p $(OBJDIR)/$@ - @$(MAKE) -C $@ TARGET=$(TARGET) DEBUG=$(DEBUG) OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEMORYSIZE} + @$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ clean: @echo "cleaning plugins" @rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \ $(OBJS) $(DEFS) - @$(MAKE) -C lib clean - @$(MAKE) -C rockboy clean - @$(MAKE) -C searchengine clean + @$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib + @$(MAKE) -C rockboy clean OBJDIR=$(OBJDIR)/rockboy + @$(MAKE) -C searchengine clean OBJDIR=$(OBJDIR)/searchengine -include $(DEPFILE) diff --git a/apps/plugins/a52towav.c b/apps/plugins/a52towav.c index 7bec8f290f..32353d823f 100644 --- a/apps/plugins/a52towav.c +++ b/apps/plugins/a52towav.c @@ -31,17 +31,10 @@ static struct plugin_api* rb; -/* FIX: We can remove this warning when the build system has a - mechanism for auto-detecting the endianness of the target CPU - - WORDS_BIGENDIAN is defined in liba52/config.h and is also used - internally by liba52. - */ - #ifdef WORDS_BIGENDIAN - #warning ************************************* BIG ENDIAN - #define LE_S16(x) ( (uint16_t) ( ((uint16_t)(x) >> 8) | ((uint16_t)(x) << 8) ) ) +#define LE_S16(x) ( (uint16_t) ( ((uint16_t)(x) >> 8) | ((uint16_t)(x) << 8) ) ) #else - #define LE_S16(x) (x) +#define LE_S16(x) (x) #endif diff --git a/apps/plugins/lib/Makefile b/apps/plugins/lib/Makefile index fbd4cefbe0..21dea571ae 100644 --- a/apps/plugins/lib/Makefile +++ b/apps/plugins/lib/Makefile @@ -11,7 +11,7 @@ # .. for stuff in the plugins dir # . for stuff in the pluginlib dir INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers + -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) ifdef APPEXTRA INCLUDES += -I$(APPSDIR)/$(APPEXTRA) @@ -28,7 +28,7 @@ OBJS := $(SRC:%.c=$(OBJDIR)/%.o) DEPFILE = $(OBJDIR)/dep-pluginlib DIRS = . -OUTPUT = $(OBJDIR)/libplugin.a +OUTPUT = $(BUILDDIR)/libplugin.a all: $(OUTPUT) diff --git a/apps/plugins/mpc2wav.c b/apps/plugins/mpc2wav.c index 747fbdc9ae..b1478bac31 100644 --- a/apps/plugins/mpc2wav.c +++ b/apps/plugins/mpc2wav.c @@ -77,8 +77,8 @@ get_size_impl(void *data) bool canseek_impl(void *data) { - file_info_struct *f = (file_info_struct *)data; - return true; + (void)data; + return true; } static int @@ -110,7 +110,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) file_info_struct file_info; unsigned short Sample; unsigned status = 1; - int i; + unsigned int i; mpc_reader reader; /* Generic plugin inititialisation */ diff --git a/apps/plugins/rockboy/Makefile b/apps/plugins/rockboy/Makefile index 020d67bec8..dab4aa871e 100644 --- a/apps/plugins/rockboy/Makefile +++ b/apps/plugins/rockboy/Makefile @@ -7,8 +7,8 @@ # $Id$ # -INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers +INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ + -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) CFLAGS = $(GCCOPTS) -O3 $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ -DMEM=${MEMORYSIZE} -DPLUGIN @@ -46,13 +46,13 @@ endif all: $(OUTPUT) ifndef SIMVER -$(OBJDIR)/rockboy.elf: $(OBJS) $(LINKFILE) $(OUTDIR)/libplugin.a - @echo "LD $@" - @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(OUTDIR) -lplugin -lgcc \ +$(OBJDIR)/rockboy.elf: $(OBJS) $(LINKFILE) + @echo "LD "`basename $@` + @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockboy.map $(OUTPUT): $(OBJDIR)/rockboy.elf - @echo "OBJCOPY $<" + @echo "OBJCOPY "`basename $@` @$(OC) -O binary $< $@ else @@ -60,9 +60,9 @@ ifeq ($(SIMVER), x11) ################################################### # This is the X11 simulator version -$(OUTPUT): $(OBJS) $(OUTDIR)/libplugin.a +$(OUTPUT): $(OBJS) @echo "LD $@" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(OUTDIR) -lplugin -o $@ + @$(CC) $(CFLAGS) -shared $(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 @@ -77,11 +77,11 @@ else # end of x11-simulator DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin -$(OUTPUT): $(OBJS) $(OUTDIR)/libplugin.a +$(OUTPUT): $(OBJS) @echo "DLL $@" @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ - $(OUTDIR)/libplugin.a -o $@ + $(BUILDDIR)/libplugin.a -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 @@ -96,10 +96,10 @@ endif # end of simulator section include $(TOOLSDIR)/make.inc -# MEM should be passed on to this makefile with the chosen memory size given -# in number of MB +# MEMORYSIZE should be passed on to this makefile with the chosen memory size +# given in number of MB $(LINKFILE): $(LDS) - @echo "build $@" + @echo "build "`basename $@` @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \ -E -P - >$@ diff --git a/apps/plugins/rockboy/defs.h b/apps/plugins/rockboy/defs.h index 4c520ef698..fc929635cf 100644 --- a/apps/plugins/rockboy/defs.h +++ b/apps/plugins/rockboy/defs.h @@ -6,7 +6,7 @@ #include "rockmacros.h" -#ifdef LITTLE_ENDIAN +#ifdef ROCKBOX_LITTLE_ENDIAN #define LO 0 #define HI 1 #else diff --git a/apps/plugins/rockboy/fastmem.c b/apps/plugins/rockboy/fastmem.c index ffb0ed5371..d883438ce1 100644 --- a/apps/plugins/rockboy/fastmem.c +++ b/apps/plugins/rockboy/fastmem.c @@ -69,7 +69,7 @@ int readw(int a) byte *p = mbc.rmap[a>>12]; if (p) { -#ifdef LITTLE_ENDIAN +#ifdef ROCKBOX_LITTLE_ENDIAN #ifndef ALLOW_UNALIGNED_IO if (a&1) return p[a] | (p[a+1]<<8); #endif @@ -89,7 +89,7 @@ void writew(int a, int w) byte *p = mbc.wmap[a>>12]; if (p) { -#ifdef LITTLE_ENDIAN +#ifdef ROCKBOX_LITTLE_ENDIAN #ifndef ALLOW_UNALIGNED_IO if (a&1) { diff --git a/apps/plugins/rockboy/rockmacros.h b/apps/plugins/rockboy/rockmacros.h index a6ca0f7231..03a6810a55 100644 --- a/apps/plugins/rockboy/rockmacros.h +++ b/apps/plugins/rockboy/rockmacros.h @@ -19,10 +19,7 @@ #include <plugin.h> -/* workaround for cygwin not defining endian macros */ -#if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) && defined(_X86_) -#define LITTLE_ENDIAN -#endif +#include "autoconf.h" #define malloc(a) my_malloc(a) void *my_malloc(size_t size); diff --git a/apps/plugins/rockboy/save.c b/apps/plugins/rockboy/save.c index dc94ce69ff..f14a7191c1 100644 --- a/apps/plugins/rockboy/save.c +++ b/apps/plugins/rockboy/save.c @@ -15,7 +15,7 @@ -#ifdef LITTLE_ENDIAN +#ifdef ROCKBOX_LITTLE_ENDIAN #define LIL(x) (x) #else #define LIL(x) ((x<<24)|((x&0xff00)<<8)|((x>>8)&0xff00)|(x>>24)) diff --git a/apps/plugins/searchengine/Makefile b/apps/plugins/searchengine/Makefile index e6e980b7b0..e59bd8fbde 100644 --- a/apps/plugins/searchengine/Makefile +++ b/apps/plugins/searchengine/Makefile @@ -7,8 +7,8 @@ # $Id$ # -INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) +INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ + -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) CFLAGS = $(GCCOPTS) -O3 $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ -DMEM=${MEMORYSIZE} -DPLUGIN @@ -30,13 +30,13 @@ OUTPUT = $(OUTDIR)/searchengine.rock all: $(OUTPUT) ifndef SIMVER -$(OBJDIR)/searchengine.elf: $(OBJS) $(LINKFILE) $(OUTDIR)/libplugin.a - @echo "LD $@" - @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(OUTDIR) -lplugin -lgcc \ +$(OBJDIR)/searchengine.elf: $(OBJS) $(LINKFILE) + @echo "LD "`basename $@` + @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/searchengine.map $(OUTPUT): $(OBJDIR)/searchengine.elf - @echo "OBJCOPY $<" + @echo "OBJCOPY "`basename $@` @$(OC) -O binary $< $@ else @@ -44,9 +44,9 @@ ifeq ($(SIMVER), x11) ################################################### # This is the X11 simulator version -$(OUTPUT): $(OBJS) $(OUTDIR)/libplugin.a - @echo "LD $@" - @$(CC) $(CFLAGS) -shared $(OBJS) -L$(OUTDIR) -lplugin -o $@ +$(OUTPUT): $(OBJS) + @echo "LD $<" + @$(CC) $(CFLAGS) -shared $(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 @@ -61,11 +61,11 @@ else # end of x11-simulator DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin -$(OUTPUT): $(OBJS) $(OUTDIR)/libplugin.a +$(OUTPUT): $(OBJS) @echo "DLL $@" @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ - $(OUTDIR)/libplugin.a -o $@ + $(BUILDDIR)/libplugin.a -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 @@ -80,12 +80,12 @@ endif # end of simulator section include $(TOOLSDIR)/make.inc -# MEM should be passed on to this makefile with the chosen memory size given -# in number of MB +# MEMORYSIZE should be passed on to this makefile with the chosen memory size +# given in number of MB $(LINKFILE): $(LDS) - @echo "build $@" - @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \ - -E -P - >$@ + @echo "build "`basename $@` + @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ + $(DEFINES) -E -P - >$@ clean: @echo "cleaning searchengine" |