diff options
Diffstat (limited to 'apps/plugins/Makefile')
-rw-r--r-- | apps/plugins/Makefile | 39 |
1 files changed, 20 insertions, 19 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 | ||
10 | INCLUDES = -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \ | 10 | INCLUDES = -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) |
12 | CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ | 12 | CFLAGS = $(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) |
51 | all: $(OBJDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE) | 51 | all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE) |
52 | 52 | ||
53 | ifndef SIMVER | 53 | ifndef 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 $< $@ |
61 | else | 61 | else |
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 $@ |
70 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 70 | ifeq ($(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 | |||
81 | DLLTOOLFLAGS = --export-all | 81 | DLLTOOLFLAGS = --export-all |
82 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | 82 | DLLWRAPFLAGS = -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 $@ |
89 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 89 | ifeq ($(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 | ||
100 | include $(TOOLSDIR)/make.inc | 100 | include $(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 | ||
117 | clean: | 118 | clean: |
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) |