diff options
Diffstat (limited to 'apps/plugins/Makefile')
-rw-r--r-- | apps/plugins/Makefile | 180 |
1 files changed, 0 insertions, 180 deletions
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile deleted file mode 100644 index 19d062286c..0000000000 --- a/apps/plugins/Makefile +++ /dev/null | |||
@@ -1,180 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES = $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \ | ||
11 | -I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib -I$(BUILDDIR) | ||
12 | |||
13 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ | ||
14 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN | ||
15 | |||
16 | ifdef APPEXTRA | ||
17 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
18 | endif | ||
19 | |||
20 | ifdef SOFTWARECODECS | ||
21 | CODECLIBS = -lmad -la52 -lffmpegFLAC -ltremor -lwavpack -lmusepack | ||
22 | endif | ||
23 | |||
24 | # Set up the bitmap libraries | ||
25 | BITMAPLIBS = | ||
26 | LINKBITMAPS = | ||
27 | ifneq ($(strip $(BMP2RB_MONO)),) | ||
28 | BITMAPLIBS += pluginbitmapsmono | ||
29 | LINKBITMAPS += -lpluginbitmapsmono | ||
30 | endif | ||
31 | ifneq ($(strip $(BMP2RB_NATIVE)),) | ||
32 | BITMAPLIBS += pluginbitmapsnative | ||
33 | LINKBITMAPS += -lpluginbitmapsnative | ||
34 | endif | ||
35 | ifneq ($(strip $(BMP2RB_REMOTEMONO)),) | ||
36 | BITMAPLIBS += pluginbitmapsremotemono | ||
37 | LINKBITMAPS += -lpluginbitmapsremotemono | ||
38 | endif | ||
39 | ifneq ($(strip $(BMP2RB_REMOTENATIVE)),) | ||
40 | BITMAPLIBS += pluginbitmapsremotenative | ||
41 | LINKBITMAPS += -lpluginbitmapsremotenative | ||
42 | endif | ||
43 | |||
44 | LDS := plugin.lds | ||
45 | LINKFILE := $(OBJDIR)/pluginlink.lds | ||
46 | DEPFILE = $(OBJDIR)/dep-plugins | ||
47 | |||
48 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
49 | include $(TOOLSDIR)/makesrc.inc | ||
50 | |||
51 | # This sets up 'SUBDIRS' based on the directories mentioned in SUBDIRS | ||
52 | include $(TOOLSDIR)/makesubdirs.inc | ||
53 | |||
54 | ROCKS := $(SRC:%.c=$(OBJDIR)/%.rock) | ||
55 | SOURCES = $(SRC) | ||
56 | ELFS := $(SRC:%.c=$(OBJDIR)/%.elf) | ||
57 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
58 | # as created by the cross-compiler for win32: | ||
59 | DEFS := $(SRC:%.c=$(OBJDIR)/%.def) | ||
60 | DIRS = . | ||
61 | |||
62 | .PHONY: $(SUBDIRS) | ||
63 | all: build | ||
64 | |||
65 | dep: $(DEPFILE) | ||
66 | |||
67 | build: $(DEPFILE) $(BITMAPLIBS) | ||
68 | $(call PRINTS,MAKE rocks)$(MAKE) rocks | ||
69 | $(call PRINTS,MAKE subdirs)$(MAKE) subdirs | ||
70 | |||
71 | rocks: $(ROCKS) | ||
72 | |||
73 | subdirs: $(SUBDIRS) | ||
74 | |||
75 | $(BUILDDIR)/credits.raw: $(DOCSDIR)/CREDITS | ||
76 | $(call PRINTS,create credits.raw)perl credits.pl < $< > $@ | ||
77 | |||
78 | $(OBJDIR)/credits.o: credits.c $(BUILDDIR)/credits.raw | ||
79 | $(SILENT)mkdir -p $(dir $@) | ||
80 | $(call PRINTS,CC $(<F))$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@ | ||
81 | |||
82 | pluginbitmapsmono: | ||
83 | $(call PRINTS,MAKE in plugins/bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono | ||
84 | |||
85 | pluginbitmapsnative: | ||
86 | $(call PRINTS,MAKE in plugins/bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native | ||
87 | |||
88 | pluginbitmapsremotemono: | ||
89 | $(call PRINTS,MAKE in plugins/bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono | ||
90 | |||
91 | pluginbitmapsremotenative: | ||
92 | $(call PRINTS,MAKE in plugins/bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native | ||
93 | |||
94 | ifndef SIMVER | ||
95 | $(OBJDIR)/%.rock: $(OBJDIR)/%.o $(LINKFILE) | ||
96 | $(SILENT)$(CC) $(CFLAGS) -o $(OBJDIR)/$*.elf $< -L$(BUILDDIR) \ | ||
97 | $(CODECLIBS) -lplugin $(LINKBITMAPS) -lgcc \ | ||
98 | -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/$*.map | ||
99 | $(call PRINTS,LINK $(@F))$(OC) -O binary $(OBJDIR)/$*.elf $(OBJDIR)/$*.rock | ||
100 | |||
101 | else | ||
102 | |||
103 | ifeq ($(SIMVER), x11) | ||
104 | ################################################### | ||
105 | # This is the X11 simulator version | ||
106 | |||
107 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o | ||
108 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ | ||
109 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
110 | # 'x' must be kept or you'll have "Win32 error 5" | ||
111 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
112 | # #define ERROR_ACCESS_DENIED 5L | ||
113 | else | ||
114 | $(SILENT)chmod -x $@ | ||
115 | endif | ||
116 | |||
117 | else # end of x11-simulator | ||
118 | ifeq ($(SIMVER), sdl) | ||
119 | ################################################### | ||
120 | # This is the SDL simulator version | ||
121 | |||
122 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o | ||
123 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ | ||
124 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
125 | # 'x' must be kept or you'll have "Win32 error 5" | ||
126 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
127 | # #define ERROR_ACCESS_DENIED 5L | ||
128 | else | ||
129 | $(SILENT)chmod -x $@ | ||
130 | endif | ||
131 | |||
132 | else # end of sdl-simulator | ||
133 | ################################################### | ||
134 | # This is the win32 simulator version | ||
135 | DLLTOOLFLAGS = --export-all | ||
136 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | ||
137 | |||
138 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o | ||
139 | $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $< | ||
140 | $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(BUILDDIR)/libplugin.a $(BITMAPLIBS) \ | ||
141 | $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) -o $@ | ||
142 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
143 | # 'x' must be kept or you'll have "Win32 error 5" | ||
144 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
145 | # #define ERROR_ACCESS_DENIED 5L | ||
146 | else | ||
147 | $(SILENT)chmod -x $@ | ||
148 | endif | ||
149 | endif # end of win32-simulator | ||
150 | endif | ||
151 | |||
152 | endif # end of simulator section | ||
153 | |||
154 | include $(TOOLSDIR)/make.inc | ||
155 | |||
156 | pluginlib: | ||
157 | $(SILENT)mkdir -p $(OBJDIR)/lib | ||
158 | $(call PRINTS,MAKE in plugin/lib)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib | ||
159 | |||
160 | $(LINKFILE): $(LDS) | ||
161 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@ | ||
162 | |||
163 | $(SUBDIRS): | ||
164 | $(SILENT)mkdir -p $(OBJDIR)/$@ | ||
165 | $(call PRINTS,MAKE in $@)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \ | ||
166 | LINKBITMAPS="$(LINKBITMAPS)" | ||
167 | |||
168 | clean: | ||
169 | $(call PRINTS,cleaning plugins)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \ | ||
170 | $(BUILDDIR)/credits.raw $(OBJS) $(DEFS) | ||
171 | $(SILENT)$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib | ||
172 | $(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono | ||
173 | $(SILENT)$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native | ||
174 | $(SILENT)$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono | ||
175 | $(SILENT)$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native | ||
176 | $(SILENT)$(MAKE) -C rockboy clean OBJDIR=$(OBJDIR)/rockboy | ||
177 | $(SILENT)$(MAKE) -C searchengine clean OBJDIR=$(OBJDIR)/searchengine | ||
178 | @rm -rf $(BUILDDIR)/pluginbitmaps | ||
179 | |||
180 | -include $(DEPFILE) | ||