summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-07 22:41:17 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-07 22:41:17 +0000
commitb8a23f9e4980e6a041d750c325ab2845aea8488a (patch)
treed10400e99208595638f13e7fe3b279274a173e56 /apps/plugins
parentd23afcd4f4ad72b1c2c087055a9ba4457f2646cd (diff)
downloadrockbox-b8a23f9e4980e6a041d750c325ab2845aea8488a.tar.gz
rockbox-b8a23f9e4980e6a041d750c325ab2845aea8488a.zip
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/Makefile39
-rw-r--r--apps/plugins/a52towav.c11
-rw-r--r--apps/plugins/lib/Makefile4
-rw-r--r--apps/plugins/mpc2wav.c6
-rw-r--r--apps/plugins/rockboy/Makefile26
-rw-r--r--apps/plugins/rockboy/defs.h2
-rw-r--r--apps/plugins/rockboy/fastmem.c4
-rw-r--r--apps/plugins/rockboy/rockmacros.h5
-rw-r--r--apps/plugins/rockboy/save.c2
-rw-r--r--apps/plugins/searchengine/Makefile32
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 @@
8# 8#
9 9
10INCLUDES = -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \ 10INCLUDES = -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \
11 -I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib 11 -I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib -I$(BUILDDIR)
12CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ 12CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
13 -DMEM=${MEMORYSIZE} -DPLUGIN 13 -DMEM=${MEMORYSIZE} -DPLUGIN
14 14
@@ -48,15 +48,15 @@ endif
48 48
49 49
50.PHONY: $(SUBDIRS) 50.PHONY: $(SUBDIRS)
51all: $(OBJDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE) 51all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE)
52 52
53ifndef SIMVER 53ifndef SIMVER
54$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(OBJDIR)/libplugin.a 54$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(BUILDDIR)/libplugin.a
55 @echo "LD $@" 55 @echo "LD "`basename $@`
56 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(OBJDIR) $(CODECLIBS) -lplugin -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$*.map 56 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(BUILDDIR) $(CODECLIBS) -lplugin -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$*.map
57 57
58$(OBJDIR)/%.rock : $(OBJDIR)/%.elf 58$(OBJDIR)/%.rock : $(OBJDIR)/%.elf
59 @echo "OBJCOPY $<" 59 @echo "OBJCOPY "`basename $@`
60 @$(OC) -O binary $< $@ 60 @$(OC) -O binary $< $@
61else 61else
62 62
@@ -64,9 +64,9 @@ ifeq ($(SIMVER), x11)
64################################################### 64###################################################
65# This is the X11 simulator version 65# This is the X11 simulator version
66 66
67$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(OBJDIR)/libplugin.a 67$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a
68 @echo "LD $@" 68 @echo "LD "`basename $@`
69 @$(CC) $(CFLAGS) -shared $< -L$(OBJDIR) $(CODECLIBS) -lplugin -o $@ 69 @$(CC) $(CFLAGS) -shared $< -L$(BUILDDIR) $(CODECLIBS) -lplugin -o $@
70ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 70ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
71# 'x' must be kept or you'll have "Win32 error 5" 71# 'x' must be kept or you'll have "Win32 error 5"
72# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 72# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -81,11 +81,11 @@ else # end of x11-simulator
81DLLTOOLFLAGS = --export-all 81DLLTOOLFLAGS = --export-all
82DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 82DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
83 83
84$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(OBJDIR)/libplugin.a 84$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a
85 @echo "DLL $@" 85 @echo "DLL "`basename $@`
86 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $< 86 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $<
87 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(OBJDIR)/libplugin.a \ 87 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(BUILDDIR)/libplugin.a \
88 $(patsubst -l%,$(OBJDIR)/lib%.a,$(CODECLIBS)) -o $@ 88 $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) -o $@
89ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 89ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
90# 'x' must be kept or you'll have "Win32 error 5" 90# 'x' must be kept or you'll have "Win32 error 5"
91# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 91# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -99,9 +99,10 @@ endif # end of simulator section
99 99
100include $(TOOLSDIR)/make.inc 100include $(TOOLSDIR)/make.inc
101 101
102$(OBJDIR)/libplugin.a: 102$(BUILDDIR)/libplugin.a:
103 @echo "MAKE in lib" 103 @echo "MAKE in lib"
104 @$(MAKE) -C lib TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEMORYSIZE} 104 @mkdir -p $(OBJDIR)/lib
105 @$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib
105 106
106# MEM should be passed on to this makefile with the chosen memory size given 107# MEM should be passed on to this makefile with the chosen memory size given
107# in number of MB 108# in number of MB
@@ -112,14 +113,14 @@ $(LINKFILE): $(LDS)
112$(SUBDIRS): 113$(SUBDIRS):
113 @echo "MAKE in $@" 114 @echo "MAKE in $@"
114 @mkdir -p $(OBJDIR)/$@ 115 @mkdir -p $(OBJDIR)/$@
115 @$(MAKE) -C $@ TARGET=$(TARGET) DEBUG=$(DEBUG) OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEMORYSIZE} 116 @$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@
116 117
117clean: 118clean:
118 @echo "cleaning plugins" 119 @echo "cleaning plugins"
119 @rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \ 120 @rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \
120 $(OBJS) $(DEFS) 121 $(OBJS) $(DEFS)
121 @$(MAKE) -C lib clean 122 @$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib
122 @$(MAKE) -C rockboy clean 123 @$(MAKE) -C rockboy clean OBJDIR=$(OBJDIR)/rockboy
123 @$(MAKE) -C searchengine clean 124 @$(MAKE) -C searchengine clean OBJDIR=$(OBJDIR)/searchengine
124 125
125-include $(DEPFILE) 126-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 @@
31 31
32static struct plugin_api* rb; 32static struct plugin_api* rb;
33 33
34/* FIX: We can remove this warning when the build system has a
35 mechanism for auto-detecting the endianness of the target CPU -
36 WORDS_BIGENDIAN is defined in liba52/config.h and is also used
37 internally by liba52.
38 */
39
40#ifdef WORDS_BIGENDIAN 34#ifdef WORDS_BIGENDIAN
41 #warning ************************************* BIG ENDIAN 35#define LE_S16(x) ( (uint16_t) ( ((uint16_t)(x) >> 8) | ((uint16_t)(x) << 8) ) )
42 #define LE_S16(x) ( (uint16_t) ( ((uint16_t)(x) >> 8) | ((uint16_t)(x) << 8) ) )
43#else 36#else
44 #define LE_S16(x) (x) 37#define LE_S16(x) (x)
45#endif 38#endif
46 39
47 40
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 @@
11# .. for stuff in the plugins dir 11# .. for stuff in the plugins dir
12# . for stuff in the pluginlib dir 12# . for stuff in the pluginlib dir
13INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 13INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
14 -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers 14 -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
15 15
16ifdef APPEXTRA 16ifdef APPEXTRA
17INCLUDES += -I$(APPSDIR)/$(APPEXTRA) 17INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
@@ -28,7 +28,7 @@ OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
28DEPFILE = $(OBJDIR)/dep-pluginlib 28DEPFILE = $(OBJDIR)/dep-pluginlib
29DIRS = . 29DIRS = .
30 30
31OUTPUT = $(OBJDIR)/libplugin.a 31OUTPUT = $(BUILDDIR)/libplugin.a
32 32
33all: $(OUTPUT) 33all: $(OUTPUT)
34 34
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)
77bool 77bool
78canseek_impl(void *data) 78canseek_impl(void *data)
79{ 79{
80 file_info_struct *f = (file_info_struct *)data; 80 (void)data;
81 return true; 81 return true;
82} 82}
83 83
84static int 84static int
@@ -110,7 +110,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
110 file_info_struct file_info; 110 file_info_struct file_info;
111 unsigned short Sample; 111 unsigned short Sample;
112 unsigned status = 1; 112 unsigned status = 1;
113 int i; 113 unsigned int i;
114 mpc_reader reader; 114 mpc_reader reader;
115 115
116 /* Generic plugin inititialisation */ 116 /* 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 @@
7# $Id$ 7# $Id$
8# 8#
9 9
10INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 10INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
11 -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers 11 -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
12CFLAGS = $(GCCOPTS) -O3 $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ 12CFLAGS = $(GCCOPTS) -O3 $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
13 -DMEM=${MEMORYSIZE} -DPLUGIN 13 -DMEM=${MEMORYSIZE} -DPLUGIN
14 14
@@ -46,13 +46,13 @@ endif
46all: $(OUTPUT) 46all: $(OUTPUT)
47 47
48ifndef SIMVER 48ifndef SIMVER
49$(OBJDIR)/rockboy.elf: $(OBJS) $(LINKFILE) $(OUTDIR)/libplugin.a 49$(OBJDIR)/rockboy.elf: $(OBJS) $(LINKFILE)
50 @echo "LD $@" 50 @echo "LD "`basename $@`
51 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(OUTDIR) -lplugin -lgcc \ 51 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
52 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockboy.map 52 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockboy.map
53 53
54$(OUTPUT): $(OBJDIR)/rockboy.elf 54$(OUTPUT): $(OBJDIR)/rockboy.elf
55 @echo "OBJCOPY $<" 55 @echo "OBJCOPY "`basename $@`
56 @$(OC) -O binary $< $@ 56 @$(OC) -O binary $< $@
57else 57else
58 58
@@ -60,9 +60,9 @@ ifeq ($(SIMVER), x11)
60################################################### 60###################################################
61# This is the X11 simulator version 61# This is the X11 simulator version
62 62
63$(OUTPUT): $(OBJS) $(OUTDIR)/libplugin.a 63$(OUTPUT): $(OBJS)
64 @echo "LD $@" 64 @echo "LD $@"
65 @$(CC) $(CFLAGS) -shared $(OBJS) -L$(OUTDIR) -lplugin -o $@ 65 @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@
66ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 66ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
67# 'x' must be kept or you'll have "Win32 error 5" 67# 'x' must be kept or you'll have "Win32 error 5"
68# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 68# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -77,11 +77,11 @@ else # end of x11-simulator
77DLLTOOLFLAGS = --export-all 77DLLTOOLFLAGS = --export-all
78DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 78DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
79 79
80$(OUTPUT): $(OBJS) $(OUTDIR)/libplugin.a 80$(OUTPUT): $(OBJS)
81 @echo "DLL $@" 81 @echo "DLL $@"
82 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 82 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
83 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ 83 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
84 $(OUTDIR)/libplugin.a -o $@ 84 $(BUILDDIR)/libplugin.a -o $@
85ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 85ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
86# 'x' must be kept or you'll have "Win32 error 5" 86# 'x' must be kept or you'll have "Win32 error 5"
87# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 87# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -96,10 +96,10 @@ endif # end of simulator section
96 96
97include $(TOOLSDIR)/make.inc 97include $(TOOLSDIR)/make.inc
98 98
99# MEM should be passed on to this makefile with the chosen memory size given 99# MEMORYSIZE should be passed on to this makefile with the chosen memory size
100# in number of MB 100# given in number of MB
101$(LINKFILE): $(LDS) 101$(LINKFILE): $(LDS)
102 @echo "build $@" 102 @echo "build "`basename $@`
103 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \ 103 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \
104 -E -P - >$@ 104 -E -P - >$@
105 105
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 @@
6 6
7#include "rockmacros.h" 7#include "rockmacros.h"
8 8
9#ifdef LITTLE_ENDIAN 9#ifdef ROCKBOX_LITTLE_ENDIAN
10#define LO 0 10#define LO 0
11#define HI 1 11#define HI 1
12#else 12#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)
69 byte *p = mbc.rmap[a>>12]; 69 byte *p = mbc.rmap[a>>12];
70 if (p) 70 if (p)
71 { 71 {
72#ifdef LITTLE_ENDIAN 72#ifdef ROCKBOX_LITTLE_ENDIAN
73#ifndef ALLOW_UNALIGNED_IO 73#ifndef ALLOW_UNALIGNED_IO
74 if (a&1) return p[a] | (p[a+1]<<8); 74 if (a&1) return p[a] | (p[a+1]<<8);
75#endif 75#endif
@@ -89,7 +89,7 @@ void writew(int a, int w)
89 byte *p = mbc.wmap[a>>12]; 89 byte *p = mbc.wmap[a>>12];
90 if (p) 90 if (p)
91 { 91 {
92#ifdef LITTLE_ENDIAN 92#ifdef ROCKBOX_LITTLE_ENDIAN
93#ifndef ALLOW_UNALIGNED_IO 93#ifndef ALLOW_UNALIGNED_IO
94 if (a&1) 94 if (a&1)
95 { 95 {
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 @@
19 19
20#include <plugin.h> 20#include <plugin.h>
21 21
22/* workaround for cygwin not defining endian macros */ 22#include "autoconf.h"
23#if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) && defined(_X86_)
24#define LITTLE_ENDIAN
25#endif
26 23
27#define malloc(a) my_malloc(a) 24#define malloc(a) my_malloc(a)
28void *my_malloc(size_t size); 25void *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 @@
15 15
16 16
17 17
18#ifdef LITTLE_ENDIAN 18#ifdef ROCKBOX_LITTLE_ENDIAN
19#define LIL(x) (x) 19#define LIL(x) (x)
20#else 20#else
21#define LIL(x) ((x<<24)|((x&0xff00)<<8)|((x>>8)&0xff00)|(x>>24)) 21#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 @@
7# $Id$ 7# $Id$
8# 8#
9 9
10INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 10INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
11 -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) 11 -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR)
12CFLAGS = $(GCCOPTS) -O3 $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ 12CFLAGS = $(GCCOPTS) -O3 $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
13 -DMEM=${MEMORYSIZE} -DPLUGIN 13 -DMEM=${MEMORYSIZE} -DPLUGIN
14 14
@@ -30,13 +30,13 @@ OUTPUT = $(OUTDIR)/searchengine.rock
30all: $(OUTPUT) 30all: $(OUTPUT)
31 31
32ifndef SIMVER 32ifndef SIMVER
33$(OBJDIR)/searchengine.elf: $(OBJS) $(LINKFILE) $(OUTDIR)/libplugin.a 33$(OBJDIR)/searchengine.elf: $(OBJS) $(LINKFILE)
34 @echo "LD $@" 34 @echo "LD "`basename $@`
35 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(OUTDIR) -lplugin -lgcc \ 35 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
36 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/searchengine.map 36 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/searchengine.map
37 37
38$(OUTPUT): $(OBJDIR)/searchengine.elf 38$(OUTPUT): $(OBJDIR)/searchengine.elf
39 @echo "OBJCOPY $<" 39 @echo "OBJCOPY "`basename $@`
40 @$(OC) -O binary $< $@ 40 @$(OC) -O binary $< $@
41else 41else
42 42
@@ -44,9 +44,9 @@ ifeq ($(SIMVER), x11)
44################################################### 44###################################################
45# This is the X11 simulator version 45# This is the X11 simulator version
46 46
47$(OUTPUT): $(OBJS) $(OUTDIR)/libplugin.a 47$(OUTPUT): $(OBJS)
48 @echo "LD $@" 48 @echo "LD $<"
49 @$(CC) $(CFLAGS) -shared $(OBJS) -L$(OUTDIR) -lplugin -o $@ 49 @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@
50ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 50ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
51# 'x' must be kept or you'll have "Win32 error 5" 51# 'x' must be kept or you'll have "Win32 error 5"
52# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 52# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -61,11 +61,11 @@ else # end of x11-simulator
61DLLTOOLFLAGS = --export-all 61DLLTOOLFLAGS = --export-all
62DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 62DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
63 63
64$(OUTPUT): $(OBJS) $(OUTDIR)/libplugin.a 64$(OUTPUT): $(OBJS)
65 @echo "DLL $@" 65 @echo "DLL $@"
66 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 66 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
67 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ 67 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
68 $(OUTDIR)/libplugin.a -o $@ 68 $(BUILDDIR)/libplugin.a -o $@
69ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 69ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
70# 'x' must be kept or you'll have "Win32 error 5" 70# 'x' must be kept or you'll have "Win32 error 5"
71# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 71# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -80,12 +80,12 @@ endif # end of simulator section
80 80
81include $(TOOLSDIR)/make.inc 81include $(TOOLSDIR)/make.inc
82 82
83# MEM should be passed on to this makefile with the chosen memory size given 83# MEMORYSIZE should be passed on to this makefile with the chosen memory size
84# in number of MB 84# given in number of MB
85$(LINKFILE): $(LDS) 85$(LINKFILE): $(LDS)
86 @echo "build $@" 86 @echo "build "`basename $@`
87 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \ 87 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
88 -E -P - >$@ 88 $(DEFINES) -E -P - >$@
89 89
90clean: 90clean:
91 @echo "cleaning searchengine" 91 @echo "cleaning searchengine"