summaryrefslogtreecommitdiff
path: root/apps/plugins/databox/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/databox/Makefile')
-rw-r--r--apps/plugins/databox/Makefile38
1 files changed, 19 insertions, 19 deletions
diff --git a/apps/plugins/databox/Makefile b/apps/plugins/databox/Makefile
index 25457b8c6c..a8a6baa557 100644
--- a/apps/plugins/databox/Makefile
+++ b/apps/plugins/databox/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
@@ -18,7 +18,7 @@ endif
18 18
19LINKFILE := $(OBJDIR)/link.lds 19LINKFILE := $(OBJDIR)/link.lds
20DEPFILE = $(OBJDIR)/dep-databox 20DEPFILE = $(OBJDIR)/dep-databox
21SRC = databox.c editparser.c edittoken.c 21SRC = databox.c editparser.c edittoken.c
22 22
23SOURCES = $(SRC) 23SOURCES = $(SRC)
24OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 24OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
@@ -30,13 +30,13 @@ OUTPUT = $(OUTDIR)/databox.rock
30all: $(OUTPUT) 30all: $(OUTPUT)
31 31
32ifndef SIMVER 32ifndef SIMVER
33$(OBJDIR)/databox.elf: $(OBJS) $(LINKFILE) $(OUTDIR)/libplugin.a 33$(OBJDIR)/databox.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)/databox.map
37 37
38$(OUTPUT): $(OBJDIR)/databox.elf 38$(OUTPUT): $(OBJDIR)/databox.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 "`basename $@`
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 databox" 91 @echo "cleaning databox"