diff options
author | Björn Stenberg <bjorn@haxx.se> | 2008-11-20 11:27:31 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2008-11-20 11:27:31 +0000 |
commit | c6b3d38a156dd624760a8eb1bb374affd43b4f2a (patch) | |
tree | 493eba929e2396d86cf4f077709aa09fe172cd35 /apps/plugins | |
parent | f66c30346783a400a029bedcd60ab67c81c34a07 (diff) | |
download | rockbox-c6b3d38a156dd624760a8eb1bb374affd43b4f2a.tar.gz rockbox-c6b3d38a156dd624760a8eb1bb374affd43b4f2a.zip |
New makefile solution: A single invocation of 'make' to build the entire tree. Fully controlled dependencies give faster and more correct recompiles.
Many #include lines adjusted to conform to the new standards.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
115 files changed, 801 insertions, 1910 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) | ||
diff --git a/apps/plugins/beatbox/Makefile b/apps/plugins/beatbox/Makefile deleted file mode 100644 index 9465c420d2..0000000000 --- a/apps/plugins/beatbox/Makefile +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id $ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) | ||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ | ||
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN -O3 | ||
14 | |||
15 | ifdef APPEXTRA | ||
16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
17 | endif | ||
18 | |||
19 | LINKFILE := $(OBJDIR)/link.lds | ||
20 | DEPFILE = $(OBJDIR)/dep-beatbox | ||
21 | |||
22 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
23 | include $(TOOLSDIR)/makesrc.inc | ||
24 | |||
25 | SOURCES = $(SRC) | ||
26 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
27 | DIRS = . | ||
28 | |||
29 | ifndef SIMVER | ||
30 | LDS := ../plugin.lds | ||
31 | OUTPUT = $(OUTDIR)/beatbox.rock | ||
32 | else ## simulators | ||
33 | OUTPUT = $(OUTDIR)/beatbox.rock | ||
34 | endif | ||
35 | |||
36 | all: $(OUTPUT) | ||
37 | |||
38 | ifndef SIMVER | ||
39 | $(OBJDIR)/beatbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) | ||
40 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
41 | $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/beatbox.map | ||
42 | |||
43 | $(OUTPUT): $(OBJDIR)/beatbox.elf | ||
44 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
45 | else | ||
46 | |||
47 | ################################################### | ||
48 | # This is the SDL simulator version | ||
49 | |||
50 | $(OUTPUT): $(OBJS) | ||
51 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
52 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
53 | # 'x' must be kept or you'll have "Win32 error 5" | ||
54 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
55 | # #define ERROR_ACCESS_DENIED 5L | ||
56 | else | ||
57 | @chmod -x $@ | ||
58 | endif | ||
59 | |||
60 | endif # end of simulator section | ||
61 | |||
62 | include $(TOOLSDIR)/make.inc | ||
63 | |||
64 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
65 | # given in number of MB | ||
66 | $(LINKFILE): $(LDS) | ||
67 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
68 | $(DEFINES) -E -P - >$@ | ||
69 | |||
70 | clean: | ||
71 | $(call PRINTS,cleaning beatbox)rm -rf $(OBJDIR)/beatbox | ||
72 | $(SILENT)rm -f $(OBJDIR)/beatbox.* $(DEPFILE) | ||
73 | |||
74 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/bitmaps/mono/Makefile b/apps/plugins/bitmaps/mono/Makefile deleted file mode 100644 index 03eb77a55b..0000000000 --- a/apps/plugins/bitmaps/mono/Makefile +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ | ||
11 | -I$(OBJDIR) | ||
12 | CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) | ||
13 | |||
14 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
15 | include $(TOOLSDIR)/makesrc.inc | ||
16 | |||
17 | SOURCES = $(SRC) | ||
18 | CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) | ||
19 | OBJS := $(CSRC:%.c=%.o) | ||
20 | DEPFILE = $(OBJDIR)/dep-bitmaps-mono | ||
21 | |||
22 | BMP2RB = $(BMP2RB_MONO) | ||
23 | OUTPUT = $(BUILDDIR)/libpluginbitmapsmono.a | ||
24 | BMPINCDIR = $(BUILDDIR)/pluginbitmaps | ||
25 | |||
26 | include $(TOOLSDIR)/makebmp.inc | ||
27 | |||
28 | clean: | ||
29 | $(call PRINTS,cleaning plugins/bitmaps/mono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) | ||
30 | @rmdir $(OBJDIR) | ||
31 | |||
32 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/bitmaps/native/Makefile b/apps/plugins/bitmaps/native/Makefile deleted file mode 100644 index 071f0d4ba1..0000000000 --- a/apps/plugins/bitmaps/native/Makefile +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ | ||
11 | -I$(OBJDIR) | ||
12 | CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) | ||
13 | |||
14 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
15 | include $(TOOLSDIR)/makesrc.inc | ||
16 | |||
17 | SOURCES = $(SRC) | ||
18 | CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) | ||
19 | OBJS := $(CSRC:%.c=%.o) | ||
20 | DEPFILE = $(OBJDIR)/dep-bitmaps-native | ||
21 | |||
22 | BMP2RB = $(BMP2RB_NATIVE) | ||
23 | OUTPUT = $(BUILDDIR)/libpluginbitmapsnative.a | ||
24 | BMPINCDIR = $(BUILDDIR)/pluginbitmaps | ||
25 | |||
26 | include $(TOOLSDIR)/makebmp.inc | ||
27 | |||
28 | clean: | ||
29 | $(call PRINTS,cleaning plugins/bitmaps/native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) | ||
30 | @rmdir $(OBJDIR) | ||
31 | |||
32 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index b95fd379c0..c248bcb97b 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES | |||
@@ -574,13 +574,13 @@ star_tiles.8x8.bmp | |||
574 | #endif | 574 | #endif |
575 | #elif LCD_DEPTH > 1 /* grey */ | 575 | #elif LCD_DEPTH > 1 /* grey */ |
576 | #if LCD_WIDTH >= 160 && LCD_HEIGHT >= 98 | 576 | #if LCD_WIDTH >= 160 && LCD_HEIGHT >= 98 |
577 | star_tiles.10x10.grey.bmp | 577 | star_tiles.10x10x2.bmp |
578 | #elif LCD_WIDTH >= 128 && LCD_HEIGHT >= 80 | 578 | #elif LCD_WIDTH >= 128 && LCD_HEIGHT >= 80 |
579 | star_tiles.8x8.grey.bmp | 579 | star_tiles.8x8x2.bmp |
580 | #endif | 580 | #endif |
581 | #else /* monochrome */ | 581 | #else /* monochrome */ |
582 | #if LCD_WIDTH >= 112 && LCD_HEIGHT >= 62 | 582 | #if LCD_WIDTH >= 112 && LCD_HEIGHT >= 62 |
583 | star_tiles.6x7.mono.bmp | 583 | star_tiles.6x7x1.bmp |
584 | #endif | 584 | #endif |
585 | #endif | 585 | #endif |
586 | 586 | ||
@@ -669,14 +669,14 @@ matrix_normal.bmp | |||
669 | /* pictureflow */ | 669 | /* pictureflow */ |
670 | #if defined(HAVE_LCD_COLOR) && defined(HAVE_ALBUMART) && defined(HAVE_TAGCACHE) | 670 | #if defined(HAVE_LCD_COLOR) && defined(HAVE_ALBUMART) && defined(HAVE_TAGCACHE) |
671 | #if (LCD_WIDTH < 200) | 671 | #if (LCD_WIDTH < 200) |
672 | pictureflow_logo.100x18x16.bmp | 672 | pictureflow_logo.100x18x16.bmp |
673 | #else | 673 | #else |
674 | pictureflow_logo.193x34x16.bmp | 674 | pictureflow_logo.193x34x16.bmp |
675 | #endif | 675 | #endif |
676 | #if (LCD_HEIGHT < 100 ) | 676 | #if (LCD_HEIGHT < 100 ) |
677 | pictureflow_emptyslide.50x50x16.bmp | 677 | pictureflow_emptyslide.50x50x16.bmp |
678 | #else | 678 | #else |
679 | pictureflow_emptyslide.100x100x16.bmp | 679 | pictureflow_emptyslide.100x100x16.bmp |
680 | #endif | 680 | #endif |
681 | #endif | 681 | #endif |
682 | 682 | ||
@@ -689,53 +689,53 @@ matrix_normal.bmp | |||
689 | 689 | ||
690 | #if defined HAVE_LCD_COLOR | 690 | #if defined HAVE_LCD_COLOR |
691 | #if SMALLER_DIMENSION <= 80 | 691 | #if SMALLER_DIMENSION <= 80 |
692 | sliding_puzzle.80x80x16.bmp | 692 | sliding_puzzle.80x80x16.bmp |
693 | #elif SMALLER_DIMENSION <= 108 | 693 | #elif SMALLER_DIMENSION <= 108 |
694 | sliding_puzzle.108x108x16.bmp | 694 | sliding_puzzle.108x108x16.bmp |
695 | #elif SMALLER_DIMENSION <= 128 | 695 | #elif SMALLER_DIMENSION <= 128 |
696 | sliding_puzzle.128x128x16.bmp | 696 | sliding_puzzle.128x128x16.bmp |
697 | #elif SMALLER_DIMENSION <= 132 | 697 | #elif SMALLER_DIMENSION <= 132 |
698 | sliding_puzzle.132x132x16.bmp | 698 | sliding_puzzle.132x132x16.bmp |
699 | #elif SMALLER_DIMENSION <= 176 | 699 | #elif SMALLER_DIMENSION <= 176 |
700 | sliding_puzzle.176x176x16.bmp | 700 | sliding_puzzle.176x176x16.bmp |
701 | #elif SMALLER_DIMENSION <= 240 | 701 | #elif SMALLER_DIMENSION <= 240 |
702 | sliding_puzzle.240x240x16.bmp | 702 | sliding_puzzle.240x240x16.bmp |
703 | #endif | 703 | #endif |
704 | #elif (LCD_DEPTH > 1) | 704 | #elif (LCD_DEPTH > 1) |
705 | #if SMALLER_DIMENSION <= 96 | 705 | #if SMALLER_DIMENSION <= 96 |
706 | sliding_puzzle.96x96x2.bmp | 706 | sliding_puzzle.96x96x2.bmp |
707 | #elif SMALLER_DIMENSION <= 110 | 707 | #elif SMALLER_DIMENSION <= 110 |
708 | sliding_puzzle.108x108x2.bmp | 708 | sliding_puzzle.108x108x2.bmp |
709 | #elif SMALLER_DIMENSION <= 128 | 709 | #elif SMALLER_DIMENSION <= 128 |
710 | sliding_puzzle.128x128x2.bmp | 710 | sliding_puzzle.128x128x2.bmp |
711 | #endif | 711 | #endif |
712 | #else /* mono targets, one size currently */ | 712 | #else /* mono targets, one size currently */ |
713 | sliding_puzzle.80x64x1.bmp | 713 | sliding_puzzle.80x64x1.bmp |
714 | #endif | 714 | #endif |
715 | 715 | ||
716 | /* Logo */ | 716 | /* Logo */ |
717 | #if LCD_DEPTH == 16 | 717 | #if LCD_DEPTH == 16 |
718 | #if (LCD_WIDTH >= 320) | 718 | #if (LCD_WIDTH >= 320) |
719 | rockboxlogo.220x68x16.bmp | 719 | rockboxlogo.220x68x16.bmp |
720 | #elif (LCD_WIDTH > 160) | 720 | #elif (LCD_WIDTH > 160) |
721 | rockboxlogo.128x40x16.bmp | 721 | rockboxlogo.128x40x16.bmp |
722 | #else | 722 | #else |
723 | rockboxlogo.90x28x16.bmp | 723 | rockboxlogo.90x28x16.bmp |
724 | #endif | 724 | #endif |
725 | 725 | ||
726 | #elif LCD_DEPTH == 2 | 726 | #elif LCD_DEPTH == 2 |
727 | #if (LCD_WIDTH > 138) | 727 | #if (LCD_WIDTH > 138) |
728 | rockboxlogo.138x46x2.bmp | 728 | rockboxlogo.138x46x2.bmp |
729 | #else | 729 | #else |
730 | rockboxlogo.91x32x2.bmp | 730 | rockboxlogo.91x32x2.bmp |
731 | #endif | 731 | #endif |
732 | 732 | ||
733 | #elif LCD_DEPTH == 1 | 733 | #elif LCD_DEPTH == 1 |
734 | #if (LCD_WIDTH > 112) | 734 | #if (LCD_WIDTH > 112) |
735 | /* Such a screen isn't currently in any target */ | 735 | /* Such a screen isn't currently in any target */ |
736 | rockboxlogo.112x30x1.bmp | 736 | rockboxlogo.112x30x1.bmp |
737 | #else | 737 | #else |
738 | rockboxlogo.91x32x1.bmp | 738 | rockboxlogo.91x32x1.bmp |
739 | #endif | 739 | #endif |
740 | #endif | 740 | #endif |
741 | 741 | ||
diff --git a/apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmp b/apps/plugins/bitmaps/native/star_tiles.10x10x2.bmp index 54e14bbbe1..54e14bbbe1 100644 --- a/apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmp +++ b/apps/plugins/bitmaps/native/star_tiles.10x10x2.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/star_tiles.6x7.mono.bmp b/apps/plugins/bitmaps/native/star_tiles.6x7x1.bmp index ebc59b9b11..ebc59b9b11 100644 --- a/apps/plugins/bitmaps/native/star_tiles.6x7.mono.bmp +++ b/apps/plugins/bitmaps/native/star_tiles.6x7x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/star_tiles.8x8.grey.bmp b/apps/plugins/bitmaps/native/star_tiles.8x8x2.bmp index 6f810ce562..6f810ce562 100644 --- a/apps/plugins/bitmaps/native/star_tiles.8x8.grey.bmp +++ b/apps/plugins/bitmaps/native/star_tiles.8x8x2.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/pluginbitmaps.make b/apps/plugins/bitmaps/pluginbitmaps.make new file mode 100644 index 0000000000..7dbcc0bdff --- /dev/null +++ b/apps/plugins/bitmaps/pluginbitmaps.make | |||
@@ -0,0 +1,59 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | PBMPINCDIR = $(BUILDDIR)/pluginbitmaps | ||
11 | |||
12 | PFLAGS += -I$(PBMPINCDIR) | ||
13 | |||
14 | ifneq ($(strip $(BMP2RB_MONO)),) | ||
15 | PBMP = $(call preprocess, $(APPSDIR)/plugins/bitmaps/mono/SOURCES) | ||
16 | endif | ||
17 | ifneq ($(strip $(BMP2RB_NATIVE)),) | ||
18 | PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/native/SOURCES) | ||
19 | endif | ||
20 | ifneq ($(strip $(BMP2RB_REMOTEMONO)),) | ||
21 | PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_mono/SOURCES) | ||
22 | endif | ||
23 | ifneq ($(strip $(BMP2RB_REMOTENATIVE)),) | ||
24 | PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_native/SOURCES) | ||
25 | endif | ||
26 | |||
27 | ifdef PBMP # does player use bitmaps? | ||
28 | |||
29 | PLUGIN_BITMAPS := $(PBMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.o) | ||
30 | |||
31 | PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a | ||
32 | PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB)) | ||
33 | |||
34 | PBMPHFILES := $(subst $(ROOTDIR),$(BUILDDIR),$(PBMP)) | ||
35 | PBMPHFILES := $(shell echo $(PBMPHFILES) | sed -e 's/\.[0-9x]\+\.bmp/.h/g' -e 's/\.bmp/.h/g' -e 's/apps\/plugins\/bitmaps\/\(mono\|native\|remote_mono\|remote_native\)/pluginbitmaps/g') | ||
36 | |||
37 | $(PBMPHFILES): $(PLUGIN_BITMAPS) | ||
38 | |||
39 | $(PLUGINBITMAPLIB): $(PLUGIN_BITMAPS) | ||
40 | $(call PRINTS,AR $(@F))$(AR) rs $@ $+ >/dev/null 2>&1 | ||
41 | |||
42 | # pattern rules to create .c files from .bmp, one for each subdir: | ||
43 | $(BUILDDIR)/apps/plugins/bitmaps/mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/mono/%.bmp $(TOOLSDIR)/bmp2rb | ||
44 | $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) | ||
45 | $(call PRINTS,BMP2RB $(<F))$(BMP2RB_MONO) -h $(PBMPINCDIR) $< > $@ | ||
46 | |||
47 | $(BUILDDIR)/apps/plugins/bitmaps/native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/native/%.bmp $(TOOLSDIR)/bmp2rb | ||
48 | $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) | ||
49 | $(call PRINTS,BMP2RB $(<F))$(BMP2RB_NATIVE) -h $(PBMPINCDIR) $< > $@ | ||
50 | |||
51 | $(BUILDDIR)/apps/plugins/bitmaps/remote_mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_mono/%.bmp $(TOOLSDIR)/bmp2rb | ||
52 | $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) | ||
53 | $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTEMONO) -h $(PBMPINCDIR) $< > $@ | ||
54 | |||
55 | $(BUILDDIR)/apps/plugins/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_native/%.bmp $(TOOLSDIR)/bmp2rb | ||
56 | $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) | ||
57 | $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTENATIVE) -h $(PBMPINCDIR) $< > $@ | ||
58 | |||
59 | endif | ||
diff --git a/apps/plugins/bitmaps/remote_mono/Makefile b/apps/plugins/bitmaps/remote_mono/Makefile deleted file mode 100644 index d3858fa46a..0000000000 --- a/apps/plugins/bitmaps/remote_mono/Makefile +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ | ||
11 | -I$(OBJDIR) | ||
12 | CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) | ||
13 | |||
14 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
15 | include $(TOOLSDIR)/makesrc.inc | ||
16 | |||
17 | SOURCES = $(SRC) | ||
18 | CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) | ||
19 | OBJS := $(CSRC:%.c=%.o) | ||
20 | DEPFILE = $(OBJDIR)/dep-bitmaps-remotemono | ||
21 | |||
22 | BMP2RB = $(BMP2RB_REMOTEMONO) | ||
23 | OUTPUT = $(BUILDDIR)/libpluginbitmapsremotemono.a | ||
24 | BMPINCDIR = $(BUILDDIR)/pluginbitmaps | ||
25 | |||
26 | include $(TOOLSDIR)/makebmp.inc | ||
27 | |||
28 | clean: | ||
29 | $(call PRINTS,cleaning plugins/bitmaps/remotemono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) | ||
30 | @rmdir $(OBJDIR) | ||
31 | |||
32 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/bitmaps/remote_native/Makefile b/apps/plugins/bitmaps/remote_native/Makefile deleted file mode 100644 index 3802e75781..0000000000 --- a/apps/plugins/bitmaps/remote_native/Makefile +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ | ||
11 | -I$(OBJDIR) | ||
12 | CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) | ||
13 | |||
14 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
15 | include $(TOOLSDIR)/makesrc.inc | ||
16 | |||
17 | SOURCES = $(SRC) | ||
18 | CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) | ||
19 | OBJS := $(CSRC:%.c=%.o) | ||
20 | DEPFILE = $(OBJDIR)/dep-bitmaps-remotenative | ||
21 | |||
22 | BMP2RB = $(BMP2RB_REMOTENATIVE) | ||
23 | OUTPUT = $(BUILDDIR)/libpluginbitmapsremotenative.a | ||
24 | BMPINCDIR = $(BUILDDIR)/pluginbitmaps | ||
25 | |||
26 | include $(TOOLSDIR)/makebmp.inc | ||
27 | |||
28 | clean: | ||
29 | $(call PRINTS,cleaning plugins/bitmaps/remote_native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) | ||
30 | @rmdir $(OBJDIR) | ||
31 | |||
32 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/bitmaps/remote_native/SOURCES b/apps/plugins/bitmaps/remote_native/SOURCES index 3633f23eb1..2bc3d59c07 100644 --- a/apps/plugins/bitmaps/remote_native/SOURCES +++ b/apps/plugins/bitmaps/remote_native/SOURCES | |||
@@ -18,7 +18,7 @@ clock_smallsegments_remote.112x64x1.bmp | |||
18 | 18 | ||
19 | /* Logo */ | 19 | /* Logo */ |
20 | #if (LCD_REMOTE_DEPTH == 1) | 20 | #if (LCD_REMOTE_DEPTH == 1) |
21 | remote_rockboxlogo.91x32x1.bmp | 21 | remote_rockboxlogo.91x32x1.bmp |
22 | #elif (LCD_REMOTE_DEPTH == 2) | 22 | #elif (LCD_REMOTE_DEPTH == 2) |
23 | remote_rockboxlogo.91x32x2.bmp | 23 | remote_rockboxlogo.91x32x2.bmp |
24 | #endif | 24 | #endif |
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index 65aaa3ef09..5d92ed1c4b 100644 --- a/apps/plugins/bounce.c +++ b/apps/plugins/bounce.c | |||
@@ -20,7 +20,7 @@ | |||
20 | **************************************************************************/ | 20 | **************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "time.h" | 22 | #include "time.h" |
23 | #include "fixedpoint.h" | 23 | #include "lib/fixedpoint.h" |
24 | 24 | ||
25 | PLUGIN_HEADER | 25 | PLUGIN_HEADER |
26 | 26 | ||
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 159e1ecfb4..6d84d2bc85 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -20,8 +20,8 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | #include "configfile.h" /* Part of libplugin */ | 23 | #include "lib/configfile.h" /* Part of libplugin */ |
24 | #include "helper.h" | 24 | #include "lib/helper.h" |
25 | 25 | ||
26 | PLUGIN_HEADER | 26 | PLUGIN_HEADER |
27 | 27 | ||
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 17bfeca01d..5415f3b506 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c | |||
@@ -25,9 +25,9 @@ | |||
25 | 25 | ||
26 | #ifdef HAVE_LCD_BITMAP | 26 | #ifdef HAVE_LCD_BITMAP |
27 | 27 | ||
28 | #include "xlcd.h" | 28 | #include "lib/xlcd.h" |
29 | #include "pluginlib_actions.h" | 29 | #include "lib/pluginlib_actions.h" |
30 | #include "fixedpoint.h" | 30 | #include "lib/fixedpoint.h" |
31 | 31 | ||
32 | PLUGIN_HEADER | 32 | PLUGIN_HEADER |
33 | 33 | ||
diff --git a/apps/plugins/chessbox.c b/apps/plugins/chessbox.c index 51ff184d62..9e86c39b11 100644 --- a/apps/plugins/chessbox.c +++ b/apps/plugins/chessbox.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #if MEM <= 8 && !defined(SIMULATOR) | 25 | #if MEM <= 8 && !defined(SIMULATOR) |
26 | 26 | ||
27 | #include "overlay.h" | 27 | #include "lib/overlay.h" |
28 | 28 | ||
29 | PLUGIN_HEADER | 29 | PLUGIN_HEADER |
30 | 30 | ||
diff --git a/apps/plugins/chessbox/Makefile b/apps/plugins/chessbox/Makefile deleted file mode 100644 index 4efb40df4c..0000000000 --- a/apps/plugins/chessbox/Makefile +++ /dev/null | |||
@@ -1,114 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(BUILDDIR)/pluginbitmaps -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) \ | ||
12 | -I$(BUILDDIR) | ||
13 | CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(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 | LINKFILE := $(OBJDIR)/link.lds | ||
21 | DEPFILE = $(OBJDIR)/dep-chessbox | ||
22 | SRC = chessbox.c gnuchess.c opening.c chessbox_pgn.c | ||
23 | |||
24 | SOURCES = $(SRC) | ||
25 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
26 | DIRS = . | ||
27 | |||
28 | ifndef SIMVER | ||
29 | ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) | ||
30 | LDS := archos.lds | ||
31 | OUTPUT = $(OUTDIR)/chessbox.ovl | ||
32 | else ## iRiver target | ||
33 | LDS := ../plugin.lds | ||
34 | OUTPUT = $(OUTDIR)/chessbox.rock | ||
35 | endif | ||
36 | else ## simulators | ||
37 | OUTPUT = $(OUTDIR)/chessbox.rock | ||
38 | endif | ||
39 | |||
40 | all: $(OUTPUT) | ||
41 | |||
42 | ifndef SIMVER | ||
43 | $(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) | ||
44 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
45 | $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/chessbox.map | ||
46 | |||
47 | $(OUTPUT): $(OBJDIR)/chessbox.elf | ||
48 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
49 | else | ||
50 | |||
51 | ifeq ($(SIMVER), x11) | ||
52 | ################################################### | ||
53 | # This is the X11 simulator version | ||
54 | |||
55 | $(OUTPUT): $(OBJS) | ||
56 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
57 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
58 | # 'x' must be kept or you'll have "Win32 error 5" | ||
59 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
60 | # #define ERROR_ACCESS_DENIED 5L | ||
61 | else | ||
62 | @chmod -x $@ | ||
63 | endif | ||
64 | |||
65 | else # end of x11-simulator | ||
66 | ifeq ($(SIMVER), sdl) | ||
67 | ################################################### | ||
68 | # This is the SDL simulator version | ||
69 | |||
70 | $(OUTPUT): $(OBJS) | ||
71 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
72 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
73 | # 'x' must be kept or you'll have "Win32 error 5" | ||
74 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
75 | # #define ERROR_ACCESS_DENIED 5L | ||
76 | else | ||
77 | @chmod -x $@ | ||
78 | endif | ||
79 | |||
80 | else # end of sdl-simulator | ||
81 | ################################################### | ||
82 | # This is the win32 simulator version | ||
83 | DLLTOOLFLAGS = --export-all | ||
84 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | ||
85 | |||
86 | $(OUTPUT): $(OBJS) | ||
87 | $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) | ||
88 | $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ | ||
89 | $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ | ||
90 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
91 | # 'x' must be kept or you'll have "Win32 error 5" | ||
92 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
93 | # #define ERROR_ACCESS_DENIED 5L | ||
94 | else | ||
95 | @chmod -x $@ | ||
96 | endif | ||
97 | endif # end of win32-simulator | ||
98 | endif | ||
99 | endif # end of simulator section | ||
100 | |||
101 | |||
102 | include $(TOOLSDIR)/make.inc | ||
103 | |||
104 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
105 | # given in number of MB | ||
106 | $(LINKFILE): $(LDS) | ||
107 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
108 | $(DEFINES) -E -P - >$@ | ||
109 | |||
110 | clean: | ||
111 | $(call PRINTS,cleaning chessbox)rm -rf $(OBJDIR)/chessbox | ||
112 | $(SILENT)rm -f $(OBJDIR)/chessbox.* $(DEPFILE) | ||
113 | |||
114 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/chessbox/SOURCES b/apps/plugins/chessbox/SOURCES new file mode 100644 index 0000000000..067e3f084a --- /dev/null +++ b/apps/plugins/chessbox/SOURCES | |||
@@ -0,0 +1,4 @@ | |||
1 | chessbox.c | ||
2 | gnuchess.c | ||
3 | opening.c | ||
4 | chessbox_pgn.c | ||
diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c index f34bdbf24a..f8db7d9b7f 100644 --- a/apps/plugins/chessbox/chessbox.c +++ b/apps/plugins/chessbox/chessbox.c | |||
@@ -43,7 +43,7 @@ extern const fb_data chessbox_pieces[]; | |||
43 | PLUGIN_HEADER | 43 | PLUGIN_HEADER |
44 | 44 | ||
45 | /* Tile size defined by the assigned bitmap */ | 45 | /* Tile size defined by the assigned bitmap */ |
46 | #include "chessbox_pieces.h" | 46 | #include "pluginbitmaps/chessbox_pieces.h" |
47 | #define TILE_WIDTH BMPWIDTH_chessbox_pieces | 47 | #define TILE_WIDTH BMPWIDTH_chessbox_pieces |
48 | #define TILE_HEIGHT (BMPHEIGHT_chessbox_pieces/26) | 48 | #define TILE_HEIGHT (BMPHEIGHT_chessbox_pieces/26) |
49 | 49 | ||
diff --git a/apps/plugins/chessbox/chessbox.make b/apps/plugins/chessbox/chessbox.make new file mode 100644 index 0000000000..d42984c771 --- /dev/null +++ b/apps/plugins/chessbox/chessbox.make | |||
@@ -0,0 +1,58 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | CHESSBOX_SRCDIR = $(APPSDIR)/plugins/chessbox | ||
11 | CHESSBOX_OBJDIR = $(BUILDDIR)/apps/plugins/chessbox | ||
12 | |||
13 | CHESSBOX_SRC := $(call preprocess, $(CHESSBOX_SRCDIR)/SOURCES) | ||
14 | CHESSBOX_OBJ := $(call c2obj, $(CHESSBOX_SRC)) | ||
15 | |||
16 | OTHER_SRC += $(CHESSBOX_SRC) | ||
17 | |||
18 | ifndef SIMVER | ||
19 | ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) | ||
20 | ## archos recorder targets | ||
21 | CHESSBOX_INLDS := $(CHESSBOX_SRCDIR)/archos.lds | ||
22 | ROCKS += $(CHESSBOX_OBJDIR)/chessbox.ovl | ||
23 | else | ||
24 | ### all other targets | ||
25 | CHESSBOX_INLDS := $(APPSDIR)/plugins/plugin.lds | ||
26 | ROCKS += $(CHESSBOX_OBJDIR)/chessbox.rock | ||
27 | endif | ||
28 | CHESSBOX_OVLFLAGS = -T$(CHESSBOX_OUTLDS) -Wl,--gc-sections -Wl,-Map,$*.map | ||
29 | CHESSBOX_OUTLDS = $(CHESSBOX_OBJDIR)/chessbox.lds | ||
30 | else | ||
31 | ### simulator | ||
32 | ROCKS += $(CHESSBOX_OBJDIR)/chessbox.rock | ||
33 | CHESSBOX_OVLFLAGS = $(SHARED_FLAG) # <-- from Makefile | ||
34 | endif | ||
35 | |||
36 | ifeq ($(CPU),sh) | ||
37 | # sh need to retain its' -Os | ||
38 | CHESSBOXFLAGS = $(PLUGINFLAGS) | ||
39 | else | ||
40 | CHESSBOXFLAGS = $(filter-out -O%,$(PLUGINFLAGS)) -O2 | ||
41 | endif | ||
42 | |||
43 | $(CHESSBOX_OUTLDS): $(CHESSBOX_INLDS) $(CHESSBOX_OBJ) | ||
44 | $(call PRINTS,PP $(<F))$(call preprocess2file,$<,$@) | ||
45 | |||
46 | $(CHESSBOX_OBJDIR)/chessbox.rock: $(CHESSBOX_OBJ) $(CHESSBOX_OUTLDS) $(PLUGINBITMAPLIB) | ||
47 | |||
48 | $(CHESSBOX_OBJDIR)/chessbox.ovl: $(CHESSBOX_OBJ) $(CHESSBOX_OUTLDS) $(PLUGINBITMAPLIB) | ||
49 | $(SILENT)$(CC) $(PLUGINFLAGS) -o $(CHESSBOX_OBJDIR)/$*.elf \ | ||
50 | $(filter %.o, $^) \ | ||
51 | $(filter %.a, $^) \ | ||
52 | -lgcc $(CHESSBOX_OVLFLAGS) | ||
53 | $(call PRINTS,LD $(@F))$(OC) -O binary $(CHESSBOX_OBJDIR)/$*.elf $@ | ||
54 | |||
55 | # special pattern rule for compiling chessbox with extra flags | ||
56 | $(CHESSBOX_OBJDIR)/%.o: $(CHESSBOX_SRCDIR)/%.c $(PLUGINBITMAPLIB) $(CHESSBOX_SRCDIR)/chessbox.make | ||
57 | $(SILENT)mkdir -p $(dir $@) | ||
58 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(CHESSBOXFLAGS) -c $< -o $@ | ||
diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index 132977753a..b497b161b5 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c | |||
@@ -21,9 +21,9 @@ | |||
21 | ****************************************************************************/ | 21 | ****************************************************************************/ |
22 | 22 | ||
23 | #include "plugin.h" | 23 | #include "plugin.h" |
24 | #include "xlcd.h" | 24 | #include "lib/xlcd.h" |
25 | #include "configfile.h" | 25 | #include "lib/configfile.h" |
26 | #include "helper.h" | 26 | #include "lib/helper.h" |
27 | 27 | ||
28 | PLUGIN_HEADER | 28 | PLUGIN_HEADER |
29 | 29 | ||
diff --git a/apps/plugins/clock/Makefile b/apps/plugins/clock/Makefile deleted file mode 100644 index abf932a682..0000000000 --- a/apps/plugins/clock/Makefile +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $$Id: $$ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. -I$(APPSDIR)/plugins/lib \ | ||
11 | $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
12 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \ | ||
13 | -I$(BUILDDIR)/pluginbitmaps | ||
14 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ | ||
15 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN | ||
16 | |||
17 | ifdef APPEXTRA | ||
18 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
19 | endif | ||
20 | |||
21 | LINKFILE := $(OBJDIR)/link.lds | ||
22 | DEPFILE = $(OBJDIR)/dep-clock | ||
23 | |||
24 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
25 | include $(TOOLSDIR)/makesrc.inc | ||
26 | |||
27 | SOURCES = $(SRC) | ||
28 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
29 | DIRS = . | ||
30 | |||
31 | ifndef SIMVER | ||
32 | LDS := ../plugin.lds | ||
33 | OUTPUT = $(OUTDIR)/clock.rock | ||
34 | else ## simulators | ||
35 | OUTPUT = $(OUTDIR)/clock.rock | ||
36 | endif | ||
37 | |||
38 | all: $(OUTPUT) | ||
39 | |||
40 | ifndef SIMVER | ||
41 | $(OBJDIR)/clock.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) | ||
42 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
43 | $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/clock.map | ||
44 | |||
45 | $(OUTPUT): $(OBJDIR)/clock.elf | ||
46 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
47 | else | ||
48 | |||
49 | ifeq ($(SIMVER), x11) | ||
50 | ################################################### | ||
51 | # This is the X11 simulator version | ||
52 | |||
53 | $(OUTPUT): $(OBJS) | ||
54 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
55 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
56 | # 'x' must be kept or you'll have "Win32 error 5" | ||
57 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
58 | # #define ERROR_ACCESS_DENIED 5L | ||
59 | else | ||
60 | @chmod -x $@ | ||
61 | endif | ||
62 | |||
63 | else # end of x11-simulator | ||
64 | ifeq ($(SIMVER), sdl) | ||
65 | ################################################### | ||
66 | # This is the SDL simulator version | ||
67 | |||
68 | $(OUTPUT): $(OBJS) | ||
69 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
70 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
71 | # 'x' must be kept or you'll have "Win32 error 5" | ||
72 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
73 | # #define ERROR_ACCESS_DENIED 5L | ||
74 | else | ||
75 | @chmod -x $@ | ||
76 | endif | ||
77 | |||
78 | else # end of sdl-simulator | ||
79 | ################################################### | ||
80 | # This is the win32 simulator version | ||
81 | DLLTOOLFLAGS = --export-all | ||
82 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | ||
83 | |||
84 | $(OUTPUT): $(OBJS) | ||
85 | $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) | ||
86 | $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ | ||
87 | $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ | ||
88 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
89 | # 'x' must be kept or you'll have "Win32 error 5" | ||
90 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
91 | # #define ERROR_ACCESS_DENIED 5L | ||
92 | else | ||
93 | @chmod -x $@ | ||
94 | endif | ||
95 | endif # end of win32-simulator | ||
96 | endif | ||
97 | endif # end of simulator section | ||
98 | |||
99 | |||
100 | include $(TOOLSDIR)/make.inc | ||
101 | |||
102 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
103 | # given in number of MB | ||
104 | $(LINKFILE): $(LDS) | ||
105 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
106 | $(DEFINES) -E -P - >$@ | ||
107 | |||
108 | clean: | ||
109 | $(call PRINTS,cleaning clock)rm -rf $(OBJDIR)/clock | ||
110 | $(SILENT)rm -f $(OBJDIR)/clock.* $(DEPFILE) | ||
111 | |||
112 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/clock/clock.c b/apps/plugins/clock/clock.c index 1d257fde6e..9279a182ee 100644 --- a/apps/plugins/clock/clock.c +++ b/apps/plugins/clock/clock.c | |||
@@ -21,8 +21,8 @@ | |||
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | #include "time.h" | 23 | #include "time.h" |
24 | #include "pluginlib_actions.h" | 24 | #include "lib/pluginlib_actions.h" |
25 | #include "xlcd.h" | 25 | #include "lib/xlcd.h" |
26 | 26 | ||
27 | #include "clock.h" | 27 | #include "clock.h" |
28 | #include "clock_counter.h" | 28 | #include "clock_counter.h" |
diff --git a/apps/plugins/clock/clock.make b/apps/plugins/clock/clock.make new file mode 100644 index 0000000000..c864d67503 --- /dev/null +++ b/apps/plugins/clock/clock.make | |||
@@ -0,0 +1,21 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | CLOCKSRCDIR := $(APPSDIR)/plugins/clock | ||
11 | CLOCKBUILDDIR := $(BUILDDIR)/apps/plugins/clock | ||
12 | |||
13 | ROCKS += $(CLOCKBUILDDIR)/clock.rock | ||
14 | |||
15 | CLOCK_SRC := $(call preprocess, $(CLOCKSRCDIR)/SOURCES) | ||
16 | CLOCK_OBJ := $(call c2obj, $(CLOCK_SRC)) | ||
17 | |||
18 | # add source files to OTHER_SRC to get automatic dependencies | ||
19 | OTHER_SRC += $(CLOCK_SRC) | ||
20 | |||
21 | $(CLOCKBUILDDIR)/clock.rock: $(CLOCK_OBJ) | ||
diff --git a/apps/plugins/clock/clock_bitmap_strings.h b/apps/plugins/clock/clock_bitmap_strings.h index 549a4a9448..3f5a09d34b 100644 --- a/apps/plugins/clock/clock_bitmap_strings.h +++ b/apps/plugins/clock/clock_bitmap_strings.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #ifndef _CLOCK_BITMAP_STRINGS_ | 23 | #ifndef _CLOCK_BITMAP_STRINGS_ |
24 | #define _CLOCK_BITMAP_STRINGS_ | 24 | #define _CLOCK_BITMAP_STRINGS_ |
25 | #include "plugin.h" | 25 | #include "plugin.h" |
26 | #include "picture.h" | 26 | #include "lib/picture.h" |
27 | 27 | ||
28 | void draw_string(struct screen* display, const struct picture* bitmaps, | 28 | void draw_string(struct screen* display, const struct picture* bitmaps, |
29 | char* str, int x, int y); | 29 | char* str, int x, int y); |
diff --git a/apps/plugins/clock/clock_bitmaps.c b/apps/plugins/clock/clock_bitmaps.c index 2a0590015a..c237a290ec 100644 --- a/apps/plugins/clock/clock_bitmaps.c +++ b/apps/plugins/clock/clock_bitmaps.c | |||
@@ -23,24 +23,24 @@ | |||
23 | #include "clock_bitmaps.h" | 23 | #include "clock_bitmaps.h" |
24 | 24 | ||
25 | /* bitmaps */ | 25 | /* bitmaps */ |
26 | #include "clock_binary.h" | 26 | #include "pluginbitmaps/clock_binary.h" |
27 | #include "clock_digits.h" | 27 | #include "pluginbitmaps/clock_digits.h" |
28 | #include "clock_smalldigits.h" | 28 | #include "pluginbitmaps/clock_smalldigits.h" |
29 | #include "clock_segments.h" | 29 | #include "pluginbitmaps/clock_segments.h" |
30 | #include "clock_smallsegments.h" | 30 | #include "pluginbitmaps/clock_smallsegments.h" |
31 | 31 | ||
32 | #include "clock_logo.h" | 32 | #include "pluginbitmaps/clock_logo.h" |
33 | #include "clock_messages.h" | 33 | #include "pluginbitmaps/clock_messages.h" |
34 | 34 | ||
35 | #if NB_SCREENS==2 | 35 | #if NB_SCREENS==2 |
36 | #include "clock_binary_remote.h" | 36 | #include "pluginbitmaps/clock_binary_remote.h" |
37 | #include "clock_digits_remote.h" | 37 | #include "pluginbitmaps/clock_digits_remote.h" |
38 | #include "clock_smalldigits_remote.h" | 38 | #include "pluginbitmaps/clock_smalldigits_remote.h" |
39 | #include "clock_segments_remote.h" | 39 | #include "pluginbitmaps/clock_segments_remote.h" |
40 | #include "clock_smallsegments_remote.h" | 40 | #include "pluginbitmaps/clock_smallsegments_remote.h" |
41 | 41 | ||
42 | #include "clock_logo_remote.h" | 42 | #include "pluginbitmaps/clock_logo_remote.h" |
43 | #include "clock_messages_remote.h" | 43 | #include "pluginbitmaps/clock_messages_remote.h" |
44 | 44 | ||
45 | #endif | 45 | #endif |
46 | 46 | ||
diff --git a/apps/plugins/clock/clock_bitmaps.h b/apps/plugins/clock/clock_bitmaps.h index e6e09652d1..750c4d397e 100644 --- a/apps/plugins/clock/clock_bitmaps.h +++ b/apps/plugins/clock/clock_bitmaps.h | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #ifndef _CLOCK_BITMAPS_ | 22 | #ifndef _CLOCK_BITMAPS_ |
23 | #define _CLOCK_BITMAPS_ | 23 | #define _CLOCK_BITMAPS_ |
24 | #include "picture.h" | 24 | #include "lib/picture.h" |
25 | 25 | ||
26 | extern const struct picture logos[]; | 26 | extern const struct picture logos[]; |
27 | extern const struct picture messages[]; | 27 | extern const struct picture messages[]; |
diff --git a/apps/plugins/clock/clock_counter.h b/apps/plugins/clock/clock_counter.h index 25523d45f6..46563e9eb7 100644 --- a/apps/plugins/clock/clock_counter.h +++ b/apps/plugins/clock/clock_counter.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _CLOCK_MESSAGE_ | 2 | #define _CLOCK_MESSAGE_ |
3 | #include "clock.h" | 3 | #include "clock.h" |
4 | #include "plugin.h" | 4 | #include "plugin.h" |
5 | #include "picture.h" | 5 | #include "lib/picture.h" |
6 | 6 | ||
7 | struct counter{ | 7 | struct counter{ |
8 | int ticks_at_last_unpause;/* to count the time from last pause to now */ | 8 | int ticks_at_last_unpause;/* to count the time from last pause to now */ |
diff --git a/apps/plugins/clock/clock_draw_analog.c b/apps/plugins/clock/clock_draw_analog.c index 391bd73519..c41ec3b24c 100644 --- a/apps/plugins/clock/clock_draw_analog.c +++ b/apps/plugins/clock/clock_draw_analog.c | |||
@@ -20,8 +20,8 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "clock_draw_analog.h" | 22 | #include "clock_draw_analog.h" |
23 | #include "xlcd.h" | 23 | #include "lib/xlcd.h" |
24 | #include "fixedpoint.h" | 24 | #include "lib/fixedpoint.h" |
25 | #include "clock_bitmaps.h" | 25 | #include "clock_bitmaps.h" |
26 | #include "clock_bitmap_strings.h" | 26 | #include "clock_bitmap_strings.h" |
27 | 27 | ||
diff --git a/apps/plugins/clock/clock_draw_binary.c b/apps/plugins/clock/clock_draw_binary.c index b6c7a9ac29..99f90934d9 100644 --- a/apps/plugins/clock/clock_draw_binary.c +++ b/apps/plugins/clock/clock_draw_binary.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "clock_draw_binary.h" | 21 | #include "clock_draw_binary.h" |
22 | #include "clock_bitmap_strings.h" | 22 | #include "clock_bitmap_strings.h" |
23 | #include "clock_bitmaps.h" | 23 | #include "clock_bitmaps.h" |
24 | #include "picture.h" | 24 | #include "lib/picture.h" |
25 | 25 | ||
26 | const struct picture* binary_skin[]={binary,digits,segments}; | 26 | const struct picture* binary_skin[]={binary,digits,segments}; |
27 | 27 | ||
diff --git a/apps/plugins/clock/clock_draw_digital.c b/apps/plugins/clock/clock_draw_digital.c index 7c5925d75f..de5f427c8c 100644 --- a/apps/plugins/clock/clock_draw_digital.c +++ b/apps/plugins/clock/clock_draw_digital.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include "clock_draw_digital.h" | 23 | #include "clock_draw_digital.h" |
24 | #include "clock_bitmap_strings.h" | 24 | #include "clock_bitmap_strings.h" |
25 | #include "clock_bitmaps.h" | 25 | #include "clock_bitmaps.h" |
26 | #include "picture.h" | 26 | #include "lib/picture.h" |
27 | 27 | ||
28 | const struct picture* digits_skin[]={digits,segments}; | 28 | const struct picture* digits_skin[]={digits,segments}; |
29 | const struct picture* smalldigits_skin[]={smalldigits,smallsegments}; | 29 | const struct picture* smalldigits_skin[]={smalldigits,smallsegments}; |
diff --git a/apps/plugins/clock/clock_settings.c b/apps/plugins/clock/clock_settings.c index 1147055ce5..1d78c4705e 100644 --- a/apps/plugins/clock/clock_settings.c +++ b/apps/plugins/clock/clock_settings.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include "clock_bitmaps.h" | 23 | #include "clock_bitmaps.h" |
24 | #include "clock_draw.h" | 24 | #include "clock_draw.h" |
25 | #include "clock_settings.h" | 25 | #include "clock_settings.h" |
26 | #include "picture.h" | 26 | #include "lib/picture.h" |
27 | 27 | ||
28 | static int max_skin[]={ | 28 | static int max_skin[]={ |
29 | [ANALOG]=2, | 29 | [ANALOG]=2, |
diff --git a/apps/plugins/credits.c b/apps/plugins/credits.c index 11a5d2fda2..e3e659bf48 100644 --- a/apps/plugins/credits.c +++ b/apps/plugins/credits.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "helper.h" | 22 | #include "lib/helper.h" |
23 | 23 | ||
24 | PLUGIN_HEADER | 24 | PLUGIN_HEADER |
25 | 25 | ||
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c index 8be304e808..ec1930f547 100644 --- a/apps/plugins/cube.c +++ b/apps/plugins/cube.c | |||
@@ -21,10 +21,10 @@ | |||
21 | * | 21 | * |
22 | ***************************************************************************/ | 22 | ***************************************************************************/ |
23 | #include "plugin.h" | 23 | #include "plugin.h" |
24 | #include "grey.h" | 24 | #include "lib/grey.h" |
25 | #include "playergfx.h" | 25 | #include "lib/playergfx.h" |
26 | #include "xlcd.h" | 26 | #include "lib/xlcd.h" |
27 | #include "fixedpoint.h" | 27 | #include "lib/fixedpoint.h" |
28 | 28 | ||
29 | PLUGIN_HEADER | 29 | PLUGIN_HEADER |
30 | 30 | ||
diff --git a/apps/plugins/demystify.c b/apps/plugins/demystify.c index 96cb5a4cc0..145c3ce0be 100644 --- a/apps/plugins/demystify.c +++ b/apps/plugins/demystify.c | |||
@@ -24,8 +24,8 @@ | |||
24 | #include "plugin.h" | 24 | #include "plugin.h" |
25 | 25 | ||
26 | #ifdef HAVE_LCD_BITMAP | 26 | #ifdef HAVE_LCD_BITMAP |
27 | #include "pluginlib_actions.h" | 27 | #include "lib/pluginlib_actions.h" |
28 | #include "helper.h" | 28 | #include "lib/helper.h" |
29 | PLUGIN_HEADER | 29 | PLUGIN_HEADER |
30 | 30 | ||
31 | #define DEFAULT_WAIT_TIME 3 | 31 | #define DEFAULT_WAIT_TIME 3 |
diff --git a/apps/plugins/dice.c b/apps/plugins/dice.c index 086309a1b8..77bbda3cae 100644 --- a/apps/plugins/dice.c +++ b/apps/plugins/dice.c | |||
@@ -20,8 +20,8 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | #include "pluginlib_actions.h" | 23 | #include "lib/pluginlib_actions.h" |
24 | #include "configfile.h" | 24 | #include "lib/configfile.h" |
25 | 25 | ||
26 | #define MAX_DICES 12 | 26 | #define MAX_DICES 12 |
27 | #define INITIAL_NB_DICES 1 | 27 | #define INITIAL_NB_DICES 1 |
diff --git a/apps/plugins/doom/Makefile b/apps/plugins/doom/Makefile deleted file mode 100644 index df6baf704b..0000000000 --- a/apps/plugins/doom/Makefile +++ /dev/null | |||
@@ -1,173 +0,0 @@ | |||
1 | ################################################################ | ||
2 | # | ||
3 | # $Id$ | ||
4 | # | ||
5 | # $Log: Makefile,v $ | ||
6 | # Revision 1.13 2006-12-13 06:52:09 kkurbjun | ||
7 | # Free more plugin memory | ||
8 | # | ||
9 | # Revision 1.12 2006-12-13 05:46:51 kkurbjun | ||
10 | # Will it fit? | ||
11 | # | ||
12 | # Revision 1.11 2006-12-13 04:44:17 kkurbjun | ||
13 | # Dehacked and BEX support for Doom - currently only supports a DEHACKED file in a WAD (not as a standalone file yet). | ||
14 | # | ||
15 | # Revision 1.10 2006-10-27 21:47:55 amiconn | ||
16 | # Next step of Makefile tuning: * Use 'make' internal commands for printing messages. Saves build time especially on cygwin. * SILENT variable used in more places. * Bitmap build system uses one Makefille less. | ||
17 | # | ||
18 | # Revision 1.9 2006-10-23 22:33:36 amiconn | ||
19 | # Consistent style of 'make' messages. Always use ranlib after ar. | ||
20 | # | ||
21 | # Revision 1.8 2006-10-23 14:09:28 markun | ||
22 | # rearrange compiler options to avoid conflicts with header files on FreeBSD | ||
23 | # | ||
24 | # Revision 1.7 2006-10-22 00:21:56 amiconn | ||
25 | # Speed up build process in general by using internal functions of make instead of spawning sub-shells where possible. | ||
26 | # | ||
27 | # Revision 1.6 2006-09-29 20:04:35 barrywardell | ||
28 | # Cleaner implementation of the recent OSX simulator build fix. No need to define SHARED_FLAG in each Makefile. Just have configure create it in the root Makefile instead. | ||
29 | # | ||
30 | # Revision 1.5 2006-09-29 16:15:08 barrywardell | ||
31 | # Allow UI simulator to be build on OS (Slightly updated version of FS5767) | ||
32 | # | ||
33 | # Revision 1.4 2006-07-27 13:27:19 linus | ||
34 | # Moved the X5 button driver to the target tree | ||
35 | # | ||
36 | # Revision 1.3 2006-04-14 21:07:56 kkurbjun | ||
37 | # Start of profiling support for doom. | ||
38 | # | ||
39 | # Revision 1.2 2006-03-29 21:16:45 kkurbjun | ||
40 | # Use rockbox endian defines | ||
41 | # | ||
42 | # Revision 1.1 2006-03-28 15:44:01 dave | ||
43 | # Patch #2969 - Doom! Currently only working on the H300. | ||
44 | # | ||
45 | # | ||
46 | |||
47 | INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
48 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) | ||
49 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ | ||
50 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN \ | ||
51 | -Wno-strict-prototypes $(PROFILE_OPTS) | ||
52 | |||
53 | ifdef APPEXTRA | ||
54 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
55 | endif | ||
56 | |||
57 | # The arm code compiles too large for the plugin buffer when set to optimize for speed | ||
58 | ifeq ($(CPU), arm) | ||
59 | CFLAGS += -Os | ||
60 | ifndef SIMVER | ||
61 | ifeq ($(TARGET), IRIVER_H100) | ||
62 | CFLAGS += -mstructure-size-boundary=8 | ||
63 | endif | ||
64 | endif | ||
65 | else | ||
66 | CFLAGS += -O2 | ||
67 | endif | ||
68 | |||
69 | LINKFILE := $(OBJDIR)/link.lds | ||
70 | DEPFILE = $(OBJDIR)/dep-doom | ||
71 | SRC = info.c doomdef.c doomstat.c dstrings.c tables.c \ | ||
72 | f_finale.c f_wipe.c d_net.c d_items.c g_game.c m_menu.c m_argv.c \ | ||
73 | m_cheat.c m_random.c am_map.c p_ceilng.c p_doors.c p_genlin.c \ | ||
74 | p_enemy.c p_floor.c p_inter.c p_lights.c p_map.c p_maputl.c p_plats.c \ | ||
75 | p_pspr.c p_setup.c p_sight.c p_spec.c p_switch.c p_mobj.c p_telept.c \ | ||
76 | p_tick.c p_saveg.c p_user.c r_bsp.c r_data.c r_draw.c r_main.c \ | ||
77 | r_plane.c r_segs.c r_sky.c r_things.c wi_stuff.c v_video.c st_lib.c \ | ||
78 | st_stuff.c hu_stuff.c hu_lib.c s_sound.c z_zone.c z_bmalloc.c sounds.c \ | ||
79 | d_main.c m_misc.c m_bbox.c i_system.c i_sound.c i_video.c \ | ||
80 | w_wad.c rockdoom.c d_deh.c ../../../firmware/common/sscanf.c | ||
81 | |||
82 | # sscanf isn't built into the core right now - should remove from here if that | ||
83 | # changes | ||
84 | |||
85 | SOURCES = $(SRC) | ||
86 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
87 | #OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) | ||
88 | #OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) | ||
89 | DIRS = . | ||
90 | |||
91 | |||
92 | ifndef SIMVER | ||
93 | LDS := ../plugin.lds | ||
94 | OUTPUT = $(OUTDIR)/doom.rock | ||
95 | else ## simulators | ||
96 | OUTPUT = $(OUTDIR)/doom.rock | ||
97 | endif | ||
98 | |||
99 | all: $(OUTPUT) | ||
100 | |||
101 | ifndef SIMVER | ||
102 | $(OBJDIR)/doom.elf: $(OBJS) $(LINKFILE) | ||
103 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc\ | ||
104 | -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/doom.map | ||
105 | |||
106 | $(OUTPUT): $(OBJDIR)/doom.elf | ||
107 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
108 | else | ||
109 | |||
110 | ifeq ($(SIMVER), x11) | ||
111 | ################################################### | ||
112 | # This is the X11 simulator version | ||
113 | |||
114 | $(OUTPUT): $(OBJS) | ||
115 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | ||
116 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
117 | # 'x' must be kept or you'll have "Win32 error 5" | ||
118 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
119 | # #define ERROR_ACCESS_DENIED 5L | ||
120 | else | ||
121 | @chmod -x $@ | ||
122 | endif | ||
123 | |||
124 | else # end of x11-simulator | ||
125 | ifeq ($(SIMVER), sdl) | ||
126 | ################################################### | ||
127 | # This is the sdl simulator version | ||
128 | |||
129 | $(OUTPUT): $(OBJS) | ||
130 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | ||
131 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
132 | # 'x' must be kept or you'll have "Win32 error 5" | ||
133 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
134 | # #define ERROR_ACCESS_DENIED 5L | ||
135 | else | ||
136 | @chmod -x $@ | ||
137 | endif | ||
138 | |||
139 | else # end of sdl-simulator | ||
140 | ################################################### | ||
141 | # This is the win32 simulator version | ||
142 | DLLTOOLFLAGS = --export-all | ||
143 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | ||
144 | |||
145 | $(OUTPUT): $(OBJS) | ||
146 | $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) | ||
147 | $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ | ||
148 | $(BUILDDIR)/libplugin.a -o $@ | ||
149 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
150 | # 'x' must be kept or you'll have "Win32 error 5" | ||
151 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
152 | # #define ERROR_ACCESS_DENIED 5L | ||
153 | else | ||
154 | @chmod -x $@ | ||
155 | endif | ||
156 | endif # end of win32-simulator | ||
157 | endif | ||
158 | endif # end of simulator section | ||
159 | |||
160 | |||
161 | include $(TOOLSDIR)/make.inc | ||
162 | |||
163 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
164 | # given in number of MB | ||
165 | $(LINKFILE): $(LDS) | ||
166 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \ | ||
167 | -E -P - >$@ | ||
168 | |||
169 | clean: | ||
170 | $(call PRINTS,cleaning doom)rm -rf $(OBJDIR)/doom | ||
171 | $(SILENT)rm -f $(OBJDIR)/doom.* $(DEPFILE) | ||
172 | |||
173 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/doom/SOURCES b/apps/plugins/doom/SOURCES new file mode 100644 index 0000000000..6cd69faee6 --- /dev/null +++ b/apps/plugins/doom/SOURCES | |||
@@ -0,0 +1,62 @@ | |||
1 | info.c | ||
2 | doomdef.c | ||
3 | doomstat.c | ||
4 | dstrings.c | ||
5 | tables.c | ||
6 | f_finale.c | ||
7 | f_wipe.c | ||
8 | d_net.c | ||
9 | d_items.c | ||
10 | g_game.c | ||
11 | m_menu.c | ||
12 | m_argv.c | ||
13 | m_cheat.c | ||
14 | m_random.c | ||
15 | am_map.c | ||
16 | p_ceilng.c | ||
17 | p_doors.c | ||
18 | p_genlin.c | ||
19 | p_enemy.c | ||
20 | p_floor.c | ||
21 | p_inter.c | ||
22 | p_lights.c | ||
23 | p_map.c | ||
24 | p_maputl.c | ||
25 | p_plats.c | ||
26 | p_pspr.c | ||
27 | p_setup.c | ||
28 | p_sight.c | ||
29 | p_spec.c | ||
30 | p_switch.c | ||
31 | p_mobj.c | ||
32 | p_telept.c | ||
33 | p_tick.c | ||
34 | p_saveg.c | ||
35 | p_user.c | ||
36 | r_bsp.c | ||
37 | r_data.c | ||
38 | r_draw.c | ||
39 | r_main.c | ||
40 | r_plane.c | ||
41 | r_segs.c | ||
42 | r_sky.c | ||
43 | r_things.c | ||
44 | wi_stuff.c | ||
45 | v_video.c | ||
46 | st_lib.c | ||
47 | st_stuff.c | ||
48 | hu_stuff.c | ||
49 | hu_lib.c | ||
50 | s_sound.c | ||
51 | z_zone.c | ||
52 | z_bmalloc.c | ||
53 | sounds.c | ||
54 | d_main.c | ||
55 | m_misc.c | ||
56 | m_bbox.c | ||
57 | i_system.c | ||
58 | i_sound.c | ||
59 | i_video.c | ||
60 | w_wad.c | ||
61 | rockdoom.c | ||
62 | d_deh.c | ||
diff --git a/apps/plugins/doom/doom.make b/apps/plugins/doom/doom.make new file mode 100644 index 0000000000..d566f5307b --- /dev/null +++ b/apps/plugins/doom/doom.make | |||
@@ -0,0 +1,54 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | DOOMSRCDIR := $(APPSDIR)/plugins/doom | ||
11 | DOOMBUILDDIR := $(BUILDDIR)/apps/plugins/doom | ||
12 | |||
13 | ROCKS += $(DOOMBUILDDIR)/doom.rock | ||
14 | |||
15 | DOOM_SRC := $(call preprocess, $(DOOMSRCDIR)/SOURCES) | ||
16 | DOOM_OBJ := $(call c2obj, $(DOOM_SRC)) | ||
17 | DOOM_OBJ += $(DOOMBUILDDIR)/sscanf.o | ||
18 | |||
19 | # add source files to OTHER_SRC to get automatic dependencies | ||
20 | OTHER_SRC += $(DOOM_SRC) | ||
21 | |||
22 | DOOMCFLAGS = $(PLUGINFLAGS) -Wno-strict-prototypes | ||
23 | |||
24 | # The arm code compiles too large for the plugin buffer when set to optimize for speed | ||
25 | ifeq ($(CPU), arm) | ||
26 | DOOMCFLAGS += -Os | ||
27 | ifndef SIMVER | ||
28 | ifeq ($(TARGET), IRIVER_H100) | ||
29 | DOOMCCFLAGS += -mstructure-size-boundary=8 | ||
30 | endif | ||
31 | endif | ||
32 | else | ||
33 | DOOMCFLAGS += -O2 | ||
34 | endif | ||
35 | |||
36 | $(DOOMBUILDDIR)/sscanf.c: $(FIRMDIR)/common/sscanf.c | ||
37 | $(SILENT)mkdir -p $(dir $@) | ||
38 | $(call PRINTS,CP $<)cp $< $@ | ||
39 | |||
40 | $(DOOMBUILDDIR)/sscanf.o: $(DOOMBUILDDIR)/sscanf.c | ||
41 | |||
42 | $(DOOMBUILDDIR)/doom.rock: $(DOOM_OBJ) | ||
43 | # for some reason, this doesn't match the implicit rule in plugins.make, | ||
44 | # so we have to duplicate the link command here | ||
45 | $(SILENT)$(CC) $(PLUGINFLAGS) -o $*.elf \ | ||
46 | $(filter %.o, $^) \ | ||
47 | $(filter %.a, $^) \ | ||
48 | -lgcc $(PLUGINLDFLAGS) | ||
49 | $(call PRINTS,LD $(@F))$(OC) -O binary $*.elf $@ | ||
50 | |||
51 | # new rule needed to use extra compile flags | ||
52 | $(DOOMBUILDDIR)/%.o: $(DOOMSRCDIR)/%.c $(DOOMSRCDIR)/doom.make | ||
53 | $(SILENT)mkdir -p $(dir $@) | ||
54 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(DOOMCFLAGS) -c $< -o $@ | ||
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c index 15d0166733..7713fe19f2 100644 --- a/apps/plugins/doom/i_video.c +++ b/apps/plugins/doom/i_video.c | |||
@@ -117,7 +117,7 @@ | |||
117 | #include "rockmacros.h" | 117 | #include "rockmacros.h" |
118 | 118 | ||
119 | #ifndef HAVE_LCD_COLOR | 119 | #ifndef HAVE_LCD_COLOR |
120 | #include "../lib/grey.h" | 120 | #include "lib/grey.h" |
121 | GREY_INFO_STRUCT_IRAM | 121 | GREY_INFO_STRUCT_IRAM |
122 | static unsigned char greybuffer[LCD_WIDTH] IBSS_ATTR; /* off screen buffer */ | 122 | static unsigned char greybuffer[LCD_WIDTH] IBSS_ATTR; /* off screen buffer */ |
123 | static unsigned char *gbuf; | 123 | static unsigned char *gbuf; |
diff --git a/apps/plugins/euroconverter.c b/apps/plugins/euroconverter.c index e982af9f24..02617abc39 100644 --- a/apps/plugins/euroconverter.c +++ b/apps/plugins/euroconverter.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "configfile.h" | 22 | #include "lib/configfile.h" |
23 | 23 | ||
24 | #ifdef HAVE_LCD_CHARCELLS | 24 | #ifdef HAVE_LCD_CHARCELLS |
25 | 25 | ||
diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c index 5987e9c429..f1b62f5b26 100644 --- a/apps/plugins/fire.c +++ b/apps/plugins/fire.c | |||
@@ -22,14 +22,14 @@ | |||
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | 23 | ||
24 | #include "plugin.h" | 24 | #include "plugin.h" |
25 | #include "helper.h" | 25 | #include "lib/helper.h" |
26 | #ifdef HAVE_LCD_BITMAP | 26 | #ifdef HAVE_LCD_BITMAP |
27 | 27 | ||
28 | #include "pluginlib_actions.h" | 28 | #include "lib/pluginlib_actions.h" |
29 | #include "fixedpoint.h" | 29 | #include "lib/fixedpoint.h" |
30 | 30 | ||
31 | #ifndef HAVE_LCD_COLOR | 31 | #ifndef HAVE_LCD_COLOR |
32 | #include "grey.h" | 32 | #include "lib/grey.h" |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) | 35 | #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) |
diff --git a/apps/plugins/fireworks.c b/apps/plugins/fireworks.c index e79f0ff377..5134d01538 100644 --- a/apps/plugins/fireworks.c +++ b/apps/plugins/fireworks.c | |||
@@ -19,8 +19,8 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "oldmenuapi.h" | 22 | #include "lib/oldmenuapi.h" |
23 | #include "helper.h" | 23 | #include "lib/helper.h" |
24 | 24 | ||
25 | PLUGIN_HEADER | 25 | PLUGIN_HEADER |
26 | 26 | ||
diff --git a/apps/plugins/greyscale.c b/apps/plugins/greyscale.c index b5fabe030d..cd8db5bf8b 100644 --- a/apps/plugins/greyscale.c +++ b/apps/plugins/greyscale.c | |||
@@ -22,10 +22,10 @@ | |||
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | 23 | ||
24 | #include "plugin.h" | 24 | #include "plugin.h" |
25 | #include "helper.h" | 25 | #include "lib/helper.h" |
26 | 26 | ||
27 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) | 27 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) |
28 | #include "grey.h" | 28 | #include "lib/grey.h" |
29 | 29 | ||
30 | PLUGIN_HEADER | 30 | PLUGIN_HEADER |
31 | 31 | ||
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c index 0f8b92d9b3..8b73221331 100644 --- a/apps/plugins/invadrox.c +++ b/apps/plugins/invadrox.c | |||
@@ -26,8 +26,8 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "plugin.h" | 28 | #include "plugin.h" |
29 | #include "highscore.h" | 29 | #include "lib/highscore.h" |
30 | #include "helper.h" | 30 | #include "lib/helper.h" |
31 | 31 | ||
32 | PLUGIN_HEADER | 32 | PLUGIN_HEADER |
33 | 33 | ||
diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c index a4865b47fb..2380dad2b9 100644 --- a/apps/plugins/jackpot.c +++ b/apps/plugins/jackpot.c | |||
@@ -20,8 +20,8 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | #include "pluginlib_actions.h" | 23 | #include "lib/pluginlib_actions.h" |
24 | #include "picture.h" | 24 | #include "lib/picture.h" |
25 | 25 | ||
26 | PLUGIN_HEADER | 26 | PLUGIN_HEADER |
27 | 27 | ||
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 075edfda33..239827c123 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c | |||
@@ -22,7 +22,7 @@ | |||
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | 23 | ||
24 | #include "plugin.h" | 24 | #include "plugin.h" |
25 | #include "playback_control.h" | 25 | #include "lib/playback_control.h" |
26 | 26 | ||
27 | #ifdef HAVE_LCD_BITMAP | 27 | #ifdef HAVE_LCD_BITMAP |
28 | 28 | ||
diff --git a/apps/plugins/jpeg/Makefile b/apps/plugins/jpeg/Makefile deleted file mode 100644 index 83207258b5..0000000000 --- a/apps/plugins/jpeg/Makefile +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \ | ||
12 | -I$(BUILDDIR)/pluginbitmaps -I$(APPSDIR)/plugins/lib | ||
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 | LINKFILE := $(OBJDIR)/link.lds | ||
21 | DEPFILE = $(OBJDIR)/dep-jpeg | ||
22 | |||
23 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
24 | include $(TOOLSDIR)/makesrc.inc | ||
25 | |||
26 | SOURCES = $(SRC) | ||
27 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
28 | DIRS = . | ||
29 | |||
30 | ifndef SIMVER | ||
31 | LDS := ../plugin.lds | ||
32 | OUTPUT = $(OUTDIR)/jpeg.rock | ||
33 | else ## simulators | ||
34 | OUTPUT = $(OUTDIR)/jpeg.rock | ||
35 | endif | ||
36 | |||
37 | all: $(OUTPUT) | ||
38 | |||
39 | ifndef SIMVER | ||
40 | $(OBJDIR)/jpeg.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) | ||
41 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
42 | $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/jpeg.map | ||
43 | |||
44 | $(OUTPUT): $(OBJDIR)/jpeg.elf | ||
45 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
46 | else | ||
47 | ################################################### | ||
48 | # This is the SDL simulator version | ||
49 | |||
50 | $(OUTPUT): $(OBJS) | ||
51 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
52 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
53 | # 'x' must be kept or you'll have "Win32 error 5" | ||
54 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
55 | # #define ERROR_ACCESS_DENIED 5L | ||
56 | else | ||
57 | @chmod -x $@ | ||
58 | endif | ||
59 | |||
60 | endif # end of simulator section | ||
61 | |||
62 | |||
63 | include $(TOOLSDIR)/make.inc | ||
64 | |||
65 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
66 | # given in number of MB | ||
67 | $(LINKFILE): $(LDS) | ||
68 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
69 | $(DEFINES) -E -P - >$@ | ||
70 | |||
71 | clean: | ||
72 | $(call PRINTS,cleaning jpeg)rm -rf $(OBJDIR)/jpeg | ||
73 | $(SILENT)rm -f $(OBJDIR)/jpeg.* $(DEPFILE) | ||
74 | |||
75 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/jpeg/jpeg.make b/apps/plugins/jpeg/jpeg.make new file mode 100644 index 0000000000..9413ef24b3 --- /dev/null +++ b/apps/plugins/jpeg/jpeg.make | |||
@@ -0,0 +1,21 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | JPEGSRCDIR := $(APPSDIR)/plugins/jpeg | ||
11 | JPEGBUILDDIR := $(BUILDDIR)/apps/plugins/jpeg | ||
12 | |||
13 | ROCKS += $(JPEGBUILDDIR)/jpeg.rock | ||
14 | |||
15 | JPEG_SRC := $(call preprocess, $(JPEGSRCDIR)/SOURCES) | ||
16 | JPEG_OBJ := $(call c2obj, $(JPEG_SRC)) | ||
17 | |||
18 | # add source files to OTHER_SRC to get automatic dependencies | ||
19 | OTHER_SRC += $(JPEG_SRC) | ||
20 | |||
21 | $(JPEGBUILDDIR)/jpeg.rock: $(JPEG_OBJ) | ||
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index fef3d4f23a..dae413ccbc 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "md5.h" | 22 | #include "lib/md5.h" |
23 | PLUGIN_HEADER | 23 | PLUGIN_HEADER |
24 | 24 | ||
25 | #define KEYBOX_FILE PLUGIN_DIR "/apps/keybox.dat" | 25 | #define KEYBOX_FILE PLUGIN_DIR "/apps/keybox.dat" |
diff --git a/apps/plugins/lamp.c b/apps/plugins/lamp.c index 94f48eae30..bad757c161 100644 --- a/apps/plugins/lamp.c +++ b/apps/plugins/lamp.c | |||
@@ -23,7 +23,7 @@ | |||
23 | ****************************************************************************/ | 23 | ****************************************************************************/ |
24 | 24 | ||
25 | #include "plugin.h" | 25 | #include "plugin.h" |
26 | #include "helper.h" | 26 | #include "lib/helper.h" |
27 | 27 | ||
28 | PLUGIN_HEADER | 28 | PLUGIN_HEADER |
29 | 29 | ||
diff --git a/apps/plugins/lib/Makefile b/apps/plugins/lib/Makefile deleted file mode 100644 index c75cca1be9..0000000000 --- a/apps/plugins/lib/Makefile +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | # ../.. for the plugin.h in the apps dir | ||
11 | # .. for stuff in the plugins dir | ||
12 | # . for stuff in the pluginlib dir | ||
13 | INCLUDES=-I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
14 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) | ||
15 | |||
16 | ifdef APPEXTRA | ||
17 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
18 | endif | ||
19 | |||
20 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ | ||
21 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN | ||
22 | |||
23 | # Sectioned compilation for target | ||
24 | ifndef SIMVER | ||
25 | CFLAGS += -ffunction-sections -fdata-sections | ||
26 | endif | ||
27 | |||
28 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
29 | include $(TOOLSDIR)/makesrc.inc | ||
30 | |||
31 | SOURCES = $(SRC) | ||
32 | OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) | ||
33 | OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) | ||
34 | DEPFILE = $(OBJDIR)/dep-pluginlib | ||
35 | DIRS = . | ||
36 | |||
37 | OUTPUT = $(BUILDDIR)/libplugin.a | ||
38 | |||
39 | all: $(OUTPUT) | ||
40 | |||
41 | $(OUTPUT): $(OBJS) | ||
42 | $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 | ||
43 | $(SILENT)$(RANLIB) $@ | ||
44 | |||
45 | include $(TOOLSDIR)/make.inc | ||
46 | |||
47 | clean: | ||
48 | $(call PRINTS,cleaning lib)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) | ||
49 | |||
50 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c index be4a39c2b5..b2e640161d 100644 --- a/apps/plugins/logo.c +++ b/apps/plugins/logo.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | **************************************************************************/ | 20 | **************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "playergfx.h" | 22 | #include "lib/playergfx.h" |
23 | 23 | ||
24 | PLUGIN_HEADER | 24 | PLUGIN_HEADER |
25 | 25 | ||
diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c index ca7f708fc8..56483bdfd3 100644 --- a/apps/plugins/mandelbrot.c +++ b/apps/plugins/mandelbrot.c | |||
@@ -23,8 +23,8 @@ | |||
23 | #include "plugin.h" | 23 | #include "plugin.h" |
24 | 24 | ||
25 | #ifdef HAVE_LCD_BITMAP | 25 | #ifdef HAVE_LCD_BITMAP |
26 | #include "grey.h" | 26 | #include "lib/grey.h" |
27 | #include "xlcd.h" | 27 | #include "lib/xlcd.h" |
28 | 28 | ||
29 | PLUGIN_HEADER | 29 | PLUGIN_HEADER |
30 | 30 | ||
diff --git a/apps/plugins/maze.c b/apps/plugins/maze.c index f7751ceb48..67c0623dec 100644 --- a/apps/plugins/maze.c +++ b/apps/plugins/maze.c | |||
@@ -31,7 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include "plugin.h" | 33 | #include "plugin.h" |
34 | #include "helper.h" | 34 | #include "lib/helper.h" |
35 | 35 | ||
36 | PLUGIN_HEADER | 36 | PLUGIN_HEADER |
37 | 37 | ||
@@ -54,7 +54,7 @@ PLUGIN_HEADER | |||
54 | # define MAZE_RDOWN (BUTTON_PLAY | BUTTON_REPEAT) | 54 | # define MAZE_RDOWN (BUTTON_PLAY | BUTTON_REPEAT) |
55 | 55 | ||
56 | #else | 56 | #else |
57 | # include "pluginlib_actions.h" | 57 | # include "lib/pluginlib_actions.h" |
58 | # define MAZE_NEW PLA_START | 58 | # define MAZE_NEW PLA_START |
59 | # define MAZE_QUIT PLA_QUIT | 59 | # define MAZE_QUIT PLA_QUIT |
60 | # define MAZE_SOLVE PLA_FIRE | 60 | # define MAZE_SOLVE PLA_FIRE |
diff --git a/apps/plugins/mazezam.c b/apps/plugins/mazezam.c index c1726a5e95..fac12def4f 100644 --- a/apps/plugins/mazezam.c +++ b/apps/plugins/mazezam.c | |||
@@ -20,10 +20,10 @@ | |||
20 | * | 20 | * |
21 | ****************************************************************************/ | 21 | ****************************************************************************/ |
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | #include "configfile.h" | 23 | #include "lib/configfile.h" |
24 | #include "helper.h" | 24 | #include "lib/helper.h" |
25 | #include "pluginlib_actions.h" | 25 | #include "lib/pluginlib_actions.h" |
26 | #include "playback_control.h" | 26 | #include "lib/playback_control.h" |
27 | 27 | ||
28 | /* Include standard plugin macro */ | 28 | /* Include standard plugin macro */ |
29 | PLUGIN_HEADER | 29 | PLUGIN_HEADER |
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c index 1841860144..58abbcaa6c 100644 --- a/apps/plugins/metronome.c +++ b/apps/plugins/metronome.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "pluginlib_actions.h" | 22 | #include "lib/pluginlib_actions.h" |
23 | 23 | ||
24 | PLUGIN_HEADER | 24 | PLUGIN_HEADER |
25 | 25 | ||
diff --git a/apps/plugins/midi/Makefile b/apps/plugins/midi/Makefile deleted file mode 100644 index 03d6bc69bb..0000000000 --- a/apps/plugins/midi/Makefile +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id $ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) | ||
12 | |||
13 | MIDIOPTS = -O2 | ||
14 | |||
15 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) $(MIDIOPTS) \ | ||
16 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN | ||
17 | |||
18 | ifdef APPEXTRA | ||
19 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
20 | endif | ||
21 | |||
22 | LINKFILE := $(OBJDIR)/link.lds | ||
23 | DEPFILE = $(OBJDIR)/dep-midiplay | ||
24 | |||
25 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
26 | include $(TOOLSDIR)/makesrc.inc | ||
27 | |||
28 | SOURCES = $(SRC) | ||
29 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
30 | DIRS = . | ||
31 | |||
32 | ifndef SIMVER | ||
33 | LDS := ../plugin.lds | ||
34 | OUTPUT = $(OUTDIR)/midiplay.rock | ||
35 | else ## simulators | ||
36 | OUTPUT = $(OUTDIR)/midiplay.rock | ||
37 | endif | ||
38 | |||
39 | all: $(OUTPUT) | ||
40 | |||
41 | ifndef SIMVER | ||
42 | $(OBJDIR)/midiplay.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) | ||
43 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
44 | $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/midiplay.map | ||
45 | |||
46 | $(OUTPUT): $(OBJDIR)/midiplay.elf | ||
47 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
48 | else | ||
49 | |||
50 | ################################################### | ||
51 | # This is the SDL simulator version | ||
52 | |||
53 | $(OUTPUT): $(OBJS) | ||
54 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
55 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
56 | # 'x' must be kept or you'll have "Win32 error 5" | ||
57 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
58 | # #define ERROR_ACCESS_DENIED 5L | ||
59 | else | ||
60 | @chmod -x $@ | ||
61 | endif | ||
62 | |||
63 | endif # end of simulator section | ||
64 | |||
65 | include $(TOOLSDIR)/make.inc | ||
66 | |||
67 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
68 | # given in number of MB | ||
69 | $(LINKFILE): $(LDS) | ||
70 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
71 | $(DEFINES) -E -P - >$@ | ||
72 | |||
73 | clean: | ||
74 | $(call PRINTS,cleaning midiplay)rm -rf $(OBJDIR)/midiplay | ||
75 | $(SILENT)rm -f $(OBJDIR)/midiplay.* $(DEPFILE) | ||
76 | |||
77 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/midi/midi.make b/apps/plugins/midi/midi.make new file mode 100644 index 0000000000..9100764974 --- /dev/null +++ b/apps/plugins/midi/midi.make | |||
@@ -0,0 +1,28 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | MIDISRCDIR := $(APPSDIR)/plugins/midi | ||
11 | MIDIBUILDDIR := $(BUILDDIR)/apps/plugins/midi | ||
12 | |||
13 | ROCKS += $(MIDIBUILDDIR)/midi.rock | ||
14 | |||
15 | MIDI_SRC := $(call preprocess, $(MIDISRCDIR)/SOURCES) | ||
16 | MIDI_OBJ := $(call c2obj, $(MIDI_SRC)) | ||
17 | |||
18 | # add source files to OTHER_SRC to get automatic dependencies | ||
19 | OTHER_SRC += $(MIDI_SRC) | ||
20 | |||
21 | $(MIDIBUILDDIR)/midi.rock: $(MIDI_OBJ) | ||
22 | # for some reason, this doesn't match the implicit rule in plugins.make, | ||
23 | # so we have to duplicate the link command here | ||
24 | $(SILENT)$(CC) $(PLUGINFLAGS) -o $*.elf \ | ||
25 | $(filter %.o, $^) \ | ||
26 | $(filter %.a, $^) \ | ||
27 | -lgcc $(PLUGINLDFLAGS) | ||
28 | $(call PRINTS,LD $(@F))$(OC) -O binary $*.elf $@ | ||
diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c index 90ffa37e07..4c8139cb0a 100644 --- a/apps/plugins/mosaique.c +++ b/apps/plugins/mosaique.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | **************************************************************************/ | 20 | **************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "playergfx.h" | 22 | #include "lib/playergfx.h" |
23 | 23 | ||
24 | PLUGIN_HEADER | 24 | PLUGIN_HEADER |
25 | 25 | ||
diff --git a/apps/plugins/mpegplayer/Makefile b/apps/plugins/mpegplayer/Makefile deleted file mode 100644 index 7f90cbcc8d..0000000000 --- a/apps/plugins/mpegplayer/Makefile +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(APPSDIR)/plugins/lib -I$(OUTDIR) -I$(BUILDDIR) | ||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ | ||
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN -DMPEGPLAYER | ||
14 | |||
15 | ifdef APPEXTRA | ||
16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
17 | endif | ||
18 | |||
19 | LINKFILE := $(OBJDIR)/link.lds | ||
20 | DEPFILE = $(OBJDIR)/dep-mpegplayer | ||
21 | |||
22 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
23 | include $(TOOLSDIR)/makesrc.inc | ||
24 | |||
25 | SOURCES = $(SRC) | ||
26 | OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) | ||
27 | OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) | ||
28 | DIRS = . | ||
29 | |||
30 | LDS := ../plugin.lds | ||
31 | OUTPUT = $(OUTDIR)/mpegplayer.rock | ||
32 | |||
33 | all: $(OUTPUT) | ||
34 | |||
35 | .PHONY: libmad-mpegplayer | ||
36 | |||
37 | $(BUILDDIR)/libmad-mpegplayer.a: libmad-mpegplayer | ||
38 | |||
39 | libmad-mpegplayer: | ||
40 | $(SILENT)mkdir -p $(OBJDIR)/libmad-mpegplayer | ||
41 | $(call PRINTS,MAKE in libmad for mpegplayer)$(MAKE) -C $(APPSDIR)/codecs/libmad MPEGPLAYER=1 OBJDIR=$(OBJDIR)/libmad-mpegplayer OUTPUT=$(BUILDDIR)/libmad-mpegplayer.a | ||
42 | |||
43 | ifndef SIMVER | ||
44 | $(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE) $(BUILDDIR)/libmad-mpegplayer.a | ||
45 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -lgcc\ | ||
46 | $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/mpegplayer.map | ||
47 | |||
48 | $(OUTPUT): $(OBJDIR)/mpegplayer.elf | ||
49 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
50 | else | ||
51 | # This is the SDL simulator version | ||
52 | |||
53 | $(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a | ||
54 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -lmad-mpegplayer -o $@ | ||
55 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
56 | # 'x' must be kept or you'll have "Win32 error 5" | ||
57 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
58 | # #define ERROR_ACCESS_DENIED 5L | ||
59 | else | ||
60 | @chmod -x $@ | ||
61 | endif | ||
62 | |||
63 | endif # end of sdl-simulator | ||
64 | |||
65 | include $(TOOLSDIR)/make.inc | ||
66 | |||
67 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
68 | # given in number of MB | ||
69 | $(LINKFILE): $(LDS) | ||
70 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
71 | $(DEFINES) -E -P - >$@ | ||
72 | |||
73 | clean: | ||
74 | $(call PRINTS,cleaning mpegplayer)rm -rf $(OBJDIR)/mpegplayer | ||
75 | $(SILENT)rm -f $(OBJDIR)/mpegplayer.* $(DEPFILE) | ||
76 | |||
77 | -include $(DEPFILE) | ||
78 | |||
diff --git a/apps/plugins/mpegplayer/audio_thread.c b/apps/plugins/mpegplayer/audio_thread.c index 351581548f..45226575c9 100644 --- a/apps/plugins/mpegplayer/audio_thread.c +++ b/apps/plugins/mpegplayer/audio_thread.c | |||
@@ -22,8 +22,8 @@ | |||
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "plugin.h" | 23 | #include "plugin.h" |
24 | #include "mpegplayer.h" | 24 | #include "mpegplayer.h" |
25 | #include "../../codecs/libmad/bit.h" | 25 | #include "codecs/libmad/bit.h" |
26 | #include "../../codecs/libmad/mad.h" | 26 | #include "codecs/libmad/mad.h" |
27 | 27 | ||
28 | /** Audio stream and thread **/ | 28 | /** Audio stream and thread **/ |
29 | struct pts_queue_slot; | 29 | struct pts_queue_slot; |
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index 14863c943d..0c66f3ff32 100644 --- a/apps/plugins/mpegplayer/mpeg_settings.c +++ b/apps/plugins/mpegplayer/mpeg_settings.c | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "plugin.h" | 1 | #include "plugin.h" |
2 | #include "helper.h" | 2 | #include "lib/helper.h" |
3 | #include "lib/configfile.h" | 3 | #include "lib/configfile.h" |
4 | #include "lib/oldmenuapi.h" | 4 | #include "lib/oldmenuapi.h" |
5 | 5 | ||
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index 5e34c2b041..dc2dc0d1fd 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c | |||
@@ -101,7 +101,7 @@ | |||
101 | *****************************************************************************/ | 101 | *****************************************************************************/ |
102 | #include "plugin.h" | 102 | #include "plugin.h" |
103 | #include "mpegplayer.h" | 103 | #include "mpegplayer.h" |
104 | #include "helper.h" | 104 | #include "lib/helper.h" |
105 | #include "mpeg_settings.h" | 105 | #include "mpeg_settings.h" |
106 | #include "mpeg2.h" | 106 | #include "mpeg2.h" |
107 | #include "video_out.h" | 107 | #include "video_out.h" |
diff --git a/apps/plugins/mpegplayer/mpegplayer.h b/apps/plugins/mpegplayer/mpegplayer.h index 4ee30b7b00..323f8f34f1 100644 --- a/apps/plugins/mpegplayer/mpegplayer.h +++ b/apps/plugins/mpegplayer/mpegplayer.h | |||
@@ -85,7 +85,7 @@ enum mpeg_malloc_reason_t | |||
85 | 85 | ||
86 | #else | 86 | #else |
87 | 87 | ||
88 | #include "grey.h" | 88 | #include "lib/grey.h" |
89 | #define DRAW_BLACK GREY_BLACK | 89 | #define DRAW_BLACK GREY_BLACK |
90 | #define DRAW_DARKGRAY GREY_DARKGRAY | 90 | #define DRAW_DARKGRAY GREY_DARKGRAY |
91 | #define DRAW_LIGHTGRAY GREY_LIGHTGRAY | 91 | #define DRAW_LIGHTGRAY GREY_LIGHTGRAY |
diff --git a/apps/plugins/mpegplayer/mpegplayer.make b/apps/plugins/mpegplayer/mpegplayer.make new file mode 100644 index 0000000000..7242be3715 --- /dev/null +++ b/apps/plugins/mpegplayer/mpegplayer.make | |||
@@ -0,0 +1,21 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | MPEGSRCDIR := $(APPSDIR)/plugins/mpegplayer | ||
11 | MPEGBUILDDIR := $(BUILDDIR)/apps/plugins/mpegplayer | ||
12 | |||
13 | ROCKS += $(MPEGBUILDDIR)/mpegplayer.rock | ||
14 | |||
15 | MPEG_SRC := $(call preprocess, $(MPEGSRCDIR)/SOURCES) | ||
16 | MPEG_OBJ := $(call c2obj, $(MPEG_SRC)) | ||
17 | |||
18 | # add source files to OTHER_SRC to get automatic dependencies | ||
19 | OTHER_SRC += $(MPEG_SRC) | ||
20 | |||
21 | $(MPEGBUILDDIR)/mpegplayer.rock: $(MPEG_OBJ) $(CODECDIR)/libmad-mpeg.a | ||
diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c index ae1ff512ea..424d2fe503 100644 --- a/apps/plugins/mpegplayer/stream_mgr.c +++ b/apps/plugins/mpegplayer/stream_mgr.c | |||
@@ -22,7 +22,7 @@ | |||
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "plugin.h" | 23 | #include "plugin.h" |
24 | #include "mpegplayer.h" | 24 | #include "mpegplayer.h" |
25 | #include "grey.h" | 25 | #include "lib/grey.h" |
26 | #include "mpeg_settings.h" | 26 | #include "mpeg_settings.h" |
27 | 27 | ||
28 | #ifndef HAVE_LCD_COLOR | 28 | #ifndef HAVE_LCD_COLOR |
diff --git a/apps/plugins/mpegplayer/video_thread.c b/apps/plugins/mpegplayer/video_thread.c index 91f08a5a66..100904b01b 100644 --- a/apps/plugins/mpegplayer/video_thread.c +++ b/apps/plugins/mpegplayer/video_thread.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include "plugin.h" | 23 | #include "plugin.h" |
24 | #include "mpegplayer.h" | 24 | #include "mpegplayer.h" |
25 | #include "mpeg2dec_config.h" | 25 | #include "mpeg2dec_config.h" |
26 | #include "grey.h" | 26 | #include "lib/grey.h" |
27 | #include "video_out.h" | 27 | #include "video_out.h" |
28 | #include "mpeg_settings.h" | 28 | #include "mpeg_settings.h" |
29 | 29 | ||
diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c index 9cb59a8fad..68b4530e40 100644 --- a/apps/plugins/oscilloscope.c +++ b/apps/plugins/oscilloscope.c | |||
@@ -22,11 +22,11 @@ | |||
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | 23 | ||
24 | #include "plugin.h" | 24 | #include "plugin.h" |
25 | #include "helper.h" | 25 | #include "lib/helper.h" |
26 | 26 | ||
27 | #ifdef HAVE_LCD_BITMAP | 27 | #ifdef HAVE_LCD_BITMAP |
28 | #include "xlcd.h" | 28 | #include "lib/xlcd.h" |
29 | #include "configfile.h" | 29 | #include "lib/configfile.h" |
30 | 30 | ||
31 | PLUGIN_HEADER | 31 | PLUGIN_HEADER |
32 | 32 | ||
diff --git a/apps/plugins/pacbox/Makefile b/apps/plugins/pacbox/Makefile deleted file mode 100644 index e1b998a7aa..0000000000 --- a/apps/plugins/pacbox/Makefile +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) | ||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ | ||
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN | ||
14 | |||
15 | ifdef APPEXTRA | ||
16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
17 | endif | ||
18 | |||
19 | LINKFILE := $(OBJDIR)/link.lds | ||
20 | DEPFILE = $(OBJDIR)/dep-pacbox | ||
21 | |||
22 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
23 | include $(TOOLSDIR)/makesrc.inc | ||
24 | |||
25 | SOURCES = $(SRC) | ||
26 | OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) | ||
27 | OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) | ||
28 | DIRS = . | ||
29 | |||
30 | LDS := ../plugin.lds | ||
31 | OUTPUT = $(OUTDIR)/pacbox.rock | ||
32 | |||
33 | all: $(OUTPUT) | ||
34 | |||
35 | ifndef SIMVER | ||
36 | $(OBJDIR)/pacbox.elf: $(OBJS) $(LINKFILE) | ||
37 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
38 | -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/pacbox.map | ||
39 | |||
40 | $(OUTPUT): $(OBJDIR)/pacbox.elf | ||
41 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
42 | else | ||
43 | |||
44 | ifeq ($(SIMVER), x11) | ||
45 | ################################################### | ||
46 | # This is the X11 simulator version | ||
47 | |||
48 | $(OUTPUT): $(OBJS) | ||
49 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | ||
50 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
51 | # 'x' must be kept or you'll have "Win32 error 5" | ||
52 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
53 | # #define ERROR_ACCESS_DENIED 5L | ||
54 | else | ||
55 | @chmod -x $@ | ||
56 | endif | ||
57 | |||
58 | else # end of x11-simulator | ||
59 | ifeq ($(SIMVER), sdl) | ||
60 | ################################################### | ||
61 | # This is the SDL simulator version | ||
62 | |||
63 | $(OUTPUT): $(OBJS) | ||
64 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | ||
65 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
66 | # 'x' must be kept or you'll have "Win32 error 5" | ||
67 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
68 | # #define ERROR_ACCESS_DENIED 5L | ||
69 | else | ||
70 | @chmod -x $@ | ||
71 | endif | ||
72 | |||
73 | else # end of sdl-simulator | ||
74 | ################################################### | ||
75 | # This is the win32 simulator version | ||
76 | DLLTOOLFLAGS = --export-all | ||
77 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | ||
78 | |||
79 | $(OUTPUT): $(OBJS) | ||
80 | $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) | ||
81 | $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ | ||
82 | $(BUILDDIR)/libplugin.a -o $@ | ||
83 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
84 | # 'x' must be kept or you'll have "Win32 error 5" | ||
85 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
86 | # #define ERROR_ACCESS_DENIED 5L | ||
87 | else | ||
88 | @chmod -x $@ | ||
89 | endif | ||
90 | endif # end of win32-simulator | ||
91 | endif | ||
92 | endif # end of simulator section | ||
93 | |||
94 | |||
95 | include $(TOOLSDIR)/make.inc | ||
96 | |||
97 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
98 | # given in number of MB | ||
99 | $(LINKFILE): $(LDS) | ||
100 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
101 | $(DEFINES) -E -P - >$@ | ||
102 | |||
103 | clean: | ||
104 | $(call PRINTS,cleaning pacbox)rm -rf $(OBJDIR)/pacbox | ||
105 | $(SILENT)rm -f $(OBJDIR)/pacbox.* $(DEPFILE) | ||
106 | |||
107 | -include $(DEPFILE) | ||
108 | |||
diff --git a/apps/plugins/pacbox/pacbox.make b/apps/plugins/pacbox/pacbox.make new file mode 100644 index 0000000000..75a599d602 --- /dev/null +++ b/apps/plugins/pacbox/pacbox.make | |||
@@ -0,0 +1,27 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | PACBOXSRCDIR := $(APPSDIR)/plugins/pacbox | ||
11 | PACBOXBUILDDIR := $(BUILDDIR)/apps/plugins/pacbox | ||
12 | |||
13 | ROCKS += $(PACBOXBUILDDIR)/pacbox.rock | ||
14 | |||
15 | PACBOX_SRC := $(call preprocess, $(PACBOXSRCDIR)/SOURCES) | ||
16 | PACBOX_OBJ := $(call c2obj, $(PACBOX_SRC)) | ||
17 | |||
18 | # add source files to OTHER_SRC to get automatic dependencies | ||
19 | OTHER_SRC += $(PACBOX_SRC) | ||
20 | |||
21 | PACBOXFLAGS = $(filter-out -O%,$(PLUGINFLAGS)) -O2 | ||
22 | |||
23 | $(PACBOXBUILDDIR)/pacbox.rock: $(PACBOX_OBJ) | ||
24 | |||
25 | $(PACBOXBUILDDIR)/%.o: $(PACBOXSRCDIR)/%.c $(PLUGINBITMAPLIB) $(PACBOXSRCDIR)/pacbox.make | ||
26 | $(SILENT)mkdir -p $(dir $@) | ||
27 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PACBOXFLAGS) -c $< -o $@ | ||
diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c index 4dde74a94f..29e8a749d5 100644 --- a/apps/plugins/pictureflow.c +++ b/apps/plugins/pictureflow.c | |||
@@ -24,10 +24,10 @@ | |||
24 | ****************************************************************************/ | 24 | ****************************************************************************/ |
25 | 25 | ||
26 | #include "plugin.h" | 26 | #include "plugin.h" |
27 | #include "pluginlib_actions.h" | 27 | #include "lib/pluginlib_actions.h" |
28 | #include "helper.h" | 28 | #include "lib/helper.h" |
29 | #include "bmp.h" | 29 | #include "lib/bmp.h" |
30 | #include "picture.h" | 30 | #include "lib/picture.h" |
31 | #include "pluginbitmaps/pictureflow_logo.h" | 31 | #include "pluginbitmaps/pictureflow_logo.h" |
32 | #include "pluginbitmaps/pictureflow_emptyslide.h" | 32 | #include "pluginbitmaps/pictureflow_emptyslide.h" |
33 | 33 | ||
diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c index 22d67b6775..5d12818beb 100644 --- a/apps/plugins/plasma.c +++ b/apps/plugins/plasma.c | |||
@@ -25,14 +25,14 @@ | |||
25 | ****************************************************************************/ | 25 | ****************************************************************************/ |
26 | 26 | ||
27 | #include "plugin.h" | 27 | #include "plugin.h" |
28 | #include "helper.h" | 28 | #include "lib/helper.h" |
29 | 29 | ||
30 | #ifdef HAVE_LCD_BITMAP | 30 | #ifdef HAVE_LCD_BITMAP |
31 | 31 | ||
32 | #ifndef HAVE_LCD_COLOR | 32 | #ifndef HAVE_LCD_COLOR |
33 | #include "grey.h" | 33 | #include "lib/grey.h" |
34 | #endif | 34 | #endif |
35 | #include "fixedpoint.h" | 35 | #include "lib/fixedpoint.h" |
36 | 36 | ||
37 | PLUGIN_HEADER | 37 | PLUGIN_HEADER |
38 | 38 | ||
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make new file mode 100644 index 0000000000..2e266cb190 --- /dev/null +++ b/apps/plugins/plugins.make | |||
@@ -0,0 +1,76 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | # single-file plugins: | ||
11 | PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES) | ||
12 | OTHER_SRC += $(PLUGINS_SRC) | ||
13 | ROCKS := $(PLUGINS_SRC:.c=.rock) | ||
14 | ROCKS := $(subst $(ROOTDIR),$(BUILDDIR),$(ROCKS)) | ||
15 | |||
16 | # libplugin.a | ||
17 | PLUGINLIB := $(BUILDDIR)/apps/plugins/libplugin.a | ||
18 | PLUGINLIB_SRC = $(call preprocess, $(APPSDIR)/plugins/lib/SOURCES) | ||
19 | OTHER_SRC += $(PLUGINLIB_SRC) | ||
20 | |||
21 | PLUGINLIB_OBJ := $(PLUGINLIB_SRC:.c=.o) | ||
22 | PLUGINLIB_OBJ := $(PLUGINLIB_OBJ:.S=.o) | ||
23 | PLUGINLIB_OBJ := $(subst $(ROOTDIR),$(BUILDDIR),$(PLUGINLIB_OBJ)) | ||
24 | |||
25 | # multifile plugins (subdirs): | ||
26 | PLUGINSUBDIRS := $(call preprocess, $(APPSDIR)/plugins/SUBDIRS) | ||
27 | |||
28 | # include <dir>.make from each subdir (yay!) | ||
29 | $(foreach dir,$(PLUGINSUBDIRS),$(eval include $(dir)/$(notdir $(dir)).make)) | ||
30 | |||
31 | ### build data / rules | ||
32 | PLUGIN_LDS := $(APPSDIR)/plugins/plugin.lds | ||
33 | PLUGINLINK_LDS := $(BUILDDIR)/apps/plugins/plugin.link | ||
34 | |||
35 | OTHER_INC += -I$(APPSDIR)/plugins | ||
36 | |||
37 | # special compile flags for plugins: | ||
38 | PLUGINFLAGS = -I$(APPSDIR)/plugins -DPLUGIN $(CFLAGS) | ||
39 | |||
40 | $(ROCKS): $(PLUGINLIB) $(APPSDIR)/plugin.h $(PLUGINLINK_LDS) $(PLUGINBITMAPLIB) | ||
41 | |||
42 | $(PLUGINLIB): $(PLUGINLIB_OBJ) | ||
43 | $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 | ||
44 | |||
45 | $(PLUGINLINK_LDS): $(PLUGIN_LDS) | ||
46 | $(call PRINTS,PP $(@F)) | ||
47 | $(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS)) | ||
48 | |||
49 | $(BUILDDIR)/credits.raw credits.raw: $(DOCSDIR)/CREDITS | ||
50 | $(call PRINTS,Create credits.raw)perl $(APPSDIR)/plugins/credits.pl < $< > $(BUILDDIR)/$(@F) | ||
51 | |||
52 | # special dependencies | ||
53 | $(BUILDDIR)/apps/plugins/wav2wv.rock: $(BUILDDIR)/apps/codecs/libwavpack.a | ||
54 | |||
55 | # special pattern rule for compiling plugin lib (with -ffunction-sections) | ||
56 | $(BUILDDIR)/apps/plugins/lib/%.o: $(ROOTDIR)/apps/plugins/lib/%.c | ||
57 | $(SILENT)mkdir -p $(dir $@) | ||
58 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -ffunction-sections -c $< -o $@ | ||
59 | |||
60 | # special pattern rule for compiling plugins with extra flags | ||
61 | $(BUILDDIR)/apps/plugins/%.o: $(ROOTDIR)/apps/plugins/%.c $(PLUGINBITMAPLIB) | ||
62 | $(SILENT)mkdir -p $(dir $@) | ||
63 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -c $< -o $@ | ||
64 | |||
65 | ifdef SIMVER | ||
66 | PLUGINLDFLAGS = $(SHARED_FLAG) # <-- from Makefile | ||
67 | else | ||
68 | PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map | ||
69 | endif | ||
70 | |||
71 | $(BUILDDIR)/%.rock: $(BUILDDIR)/%.o $(PLUGINLINK_LDS) | ||
72 | $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \ | ||
73 | $(filter %.o, $^) \ | ||
74 | $(filter %.a, $^) \ | ||
75 | -lgcc $(PLUGINLDFLAGS) | ||
76 | $(SILENT)$(OC) -O binary $(BUILDDIR)/$*.elf $@ | ||
diff --git a/apps/plugins/ppmviewer.c b/apps/plugins/ppmviewer.c index 01513c4877..97f085ad6f 100644 --- a/apps/plugins/ppmviewer.c +++ b/apps/plugins/ppmviewer.c | |||
@@ -20,7 +20,7 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | #include "bmp.h" | 23 | #include "lib/bmp.h" |
24 | 24 | ||
25 | #if defined(HAVE_LCD_COLOR) | 25 | #if defined(HAVE_LCD_COLOR) |
26 | 26 | ||
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index 3df38082ba..9c568df3be 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "oldmenuapi.h" | 22 | #include "lib/oldmenuapi.h" |
23 | 23 | ||
24 | PLUGIN_HEADER | 24 | PLUGIN_HEADER |
25 | 25 | ||
diff --git a/apps/plugins/reversi/Makefile b/apps/plugins/reversi/Makefile deleted file mode 100644 index 97a042e0f7..0000000000 --- a/apps/plugins/reversi/Makefile +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $$Id: $$ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \ | ||
12 | -I$(BUILDDIR)/pluginbitmaps | ||
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 | LINKFILE := $(OBJDIR)/link.lds | ||
21 | DEPFILE = $(OBJDIR)/dep-reversi | ||
22 | |||
23 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
24 | include $(TOOLSDIR)/makesrc.inc | ||
25 | |||
26 | SOURCES = $(SRC) | ||
27 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
28 | DIRS = . | ||
29 | |||
30 | ifndef SIMVER | ||
31 | LDS := ../plugin.lds | ||
32 | OUTPUT = $(OUTDIR)/reversi.rock | ||
33 | else ## simulators | ||
34 | OUTPUT = $(OUTDIR)/reversi.rock | ||
35 | endif | ||
36 | |||
37 | all: $(OUTPUT) | ||
38 | |||
39 | ifndef SIMVER | ||
40 | $(OBJDIR)/reversi.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) | ||
41 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
42 | $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/reversi.map | ||
43 | |||
44 | $(OUTPUT): $(OBJDIR)/reversi.elf | ||
45 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
46 | else | ||
47 | |||
48 | ifeq ($(SIMVER), x11) | ||
49 | ################################################### | ||
50 | # This is the X11 simulator version | ||
51 | |||
52 | $(OUTPUT): $(OBJS) | ||
53 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
54 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
55 | # 'x' must be kept or you'll have "Win32 error 5" | ||
56 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
57 | # #define ERROR_ACCESS_DENIED 5L | ||
58 | else | ||
59 | @chmod -x $@ | ||
60 | endif | ||
61 | |||
62 | else # end of x11-simulator | ||
63 | ifeq ($(SIMVER), sdl) | ||
64 | ################################################### | ||
65 | # This is the SDL simulator version | ||
66 | |||
67 | $(OUTPUT): $(OBJS) | ||
68 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
69 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
70 | # 'x' must be kept or you'll have "Win32 error 5" | ||
71 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
72 | # #define ERROR_ACCESS_DENIED 5L | ||
73 | else | ||
74 | @chmod -x $@ | ||
75 | endif | ||
76 | |||
77 | else # end of sdl-simulator | ||
78 | ################################################### | ||
79 | # This is the win32 simulator version | ||
80 | DLLTOOLFLAGS = --export-all | ||
81 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | ||
82 | |||
83 | $(OUTPUT): $(OBJS) | ||
84 | $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) | ||
85 | $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ | ||
86 | $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ | ||
87 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
88 | # 'x' must be kept or you'll have "Win32 error 5" | ||
89 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
90 | # #define ERROR_ACCESS_DENIED 5L | ||
91 | else | ||
92 | @chmod -x $@ | ||
93 | endif | ||
94 | endif # end of win32-simulator | ||
95 | endif | ||
96 | endif # end of simulator section | ||
97 | |||
98 | |||
99 | include $(TOOLSDIR)/make.inc | ||
100 | |||
101 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
102 | # given in number of MB | ||
103 | $(LINKFILE): $(LDS) | ||
104 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
105 | $(DEFINES) -E -P - >$@ | ||
106 | |||
107 | clean: | ||
108 | $(call PRINTS,cleaning reversi)rm -rf $(OBJDIR)/reversi | ||
109 | $(SILENT)rm -f $(OBJDIR)/reversi.* $(DEPFILE) | ||
110 | |||
111 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c index d91f24b3d9..1c1cf56168 100644 --- a/apps/plugins/reversi/reversi-gui.c +++ b/apps/plugins/reversi/reversi-gui.c | |||
@@ -47,7 +47,7 @@ further options: | |||
47 | #include "reversi-strategy.h" | 47 | #include "reversi-strategy.h" |
48 | #include "reversi-gui.h" | 48 | #include "reversi-gui.h" |
49 | 49 | ||
50 | #include "../lib/oldmenuapi.h" | 50 | #include "lib/oldmenuapi.h" |
51 | 51 | ||
52 | PLUGIN_HEADER | 52 | PLUGIN_HEADER |
53 | 53 | ||
diff --git a/apps/plugins/reversi/reversi.make b/apps/plugins/reversi/reversi.make new file mode 100644 index 0000000000..be7369423e --- /dev/null +++ b/apps/plugins/reversi/reversi.make | |||
@@ -0,0 +1,28 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | REVERSISRCDIR := $(APPSDIR)/plugins/reversi | ||
11 | REVERSIBUILDDIR := $(BUILDDIR)/apps/plugins/reversi | ||
12 | |||
13 | ROCKS += $(REVERSIBUILDDIR)/reversi.rock | ||
14 | |||
15 | REVERSI_SRC := $(call preprocess, $(REVERSISRCDIR)/SOURCES) | ||
16 | REVERSI_OBJ := $(call c2obj, $(REVERSI_SRC)) | ||
17 | |||
18 | # add source files to OTHER_SRC to get automatic dependencies | ||
19 | OTHER_SRC += $(REVERSI_SRC) | ||
20 | |||
21 | $(REVERSIBUILDDIR)/reversi.rock: $(REVERSI_OBJ) | ||
22 | # for some reason, this doesn't match the implicit rule in plugins.make, | ||
23 | # so we have to duplicate the link command here | ||
24 | $(SILENT)$(CC) $(PLUGINFLAGS) -o $*.elf \ | ||
25 | $(filter %.o, $^) \ | ||
26 | $(filter %.a, $^) \ | ||
27 | -lgcc $(PLUGINLDFLAGS) | ||
28 | $(call PRINTS,LD $(@F))$(OC) -O binary $*.elf $@ | ||
diff --git a/apps/plugins/robotfindskitten.c b/apps/plugins/robotfindskitten.c index 4b33513eb2..747689d9db 100644 --- a/apps/plugins/robotfindskitten.c +++ b/apps/plugins/robotfindskitten.c | |||
@@ -29,7 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "plugin.h" | 31 | #include "plugin.h" |
32 | #include "pluginlib_actions.h" | 32 | #include "lib/pluginlib_actions.h" |
33 | 33 | ||
34 | /* This macros must always be included. Should be placed at the top by | 34 | /* This macros must always be included. Should be placed at the top by |
35 | convention, although the actual position doesn't matter */ | 35 | convention, although the actual position doesn't matter */ |
@@ -489,6 +489,14 @@ static char* messages[] = | |||
489 | #define ROBOT 0 | 489 | #define ROBOT 0 |
490 | #define KITTEN 1 | 490 | #define KITTEN 1 |
491 | 491 | ||
492 | /* if SYSFONT_WIDTH is 0 (which it is during dependency generation) gcc | ||
493 | will abort (div by 0) and this plugin won't get any dependencies | ||
494 | */ | ||
495 | #if SYSFONT_WIDTH < 1 | ||
496 | #define SYSFONT_WIDTH 10 | ||
497 | #define SYSFONT_HEIGHT 10 | ||
498 | #endif | ||
499 | |||
492 | /*Screen dimensions.*/ | 500 | /*Screen dimensions.*/ |
493 | #define X_MIN 0 | 501 | #define X_MIN 0 |
494 | #define X_MAX ((LCD_WIDTH/SYSFONT_WIDTH) - 1) | 502 | #define X_MAX ((LCD_WIDTH/SYSFONT_WIDTH) - 1) |
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 5ff220f2f1..d9b1c0aeb5 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c | |||
@@ -21,9 +21,9 @@ | |||
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "plugin.h" | 23 | #include "plugin.h" |
24 | #include "highscore.h" | 24 | #include "lib/highscore.h" |
25 | #include "playergfx.h" | 25 | #include "lib/playergfx.h" |
26 | #include "helper.h" | 26 | #include "lib/helper.h" |
27 | 27 | ||
28 | PLUGIN_HEADER | 28 | PLUGIN_HEADER |
29 | 29 | ||
diff --git a/apps/plugins/rockboy.c b/apps/plugins/rockboy.c index af3877154a..f3d25e21cd 100644 --- a/apps/plugins/rockboy.c +++ b/apps/plugins/rockboy.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #if MEM <= 8 && !defined(SIMULATOR) | 25 | #if MEM <= 8 && !defined(SIMULATOR) |
26 | 26 | ||
27 | #include "overlay.h" | 27 | #include "lib/overlay.h" |
28 | 28 | ||
29 | PLUGIN_HEADER | 29 | PLUGIN_HEADER |
30 | 30 | ||
diff --git a/apps/plugins/rockboy/Makefile b/apps/plugins/rockboy/Makefile deleted file mode 100644 index 4aa8526125..0000000000 --- a/apps/plugins/rockboy/Makefile +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) | ||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ | ||
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN -finline-functions | ||
14 | |||
15 | ifdef APPEXTRA | ||
16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
17 | endif | ||
18 | |||
19 | LINKFILE := $(OBJDIR)/link.lds | ||
20 | DEPFILE = $(OBJDIR)/dep-rockboy | ||
21 | SRC = cpu.c emu.c events.c fastmem.c hw.c lcd.c lcdc.c loader.c \ | ||
22 | mem.c menu.c rbsound.c rockboy.c rtc.c save.c sound.c sys_rockbox.c \ | ||
23 | ../../../firmware/common/sscanf.c | ||
24 | |||
25 | #CFLAGS += -DDYNAREC | ||
26 | #SRC += dynarec.c | ||
27 | |||
28 | SOURCES = $(SRC) | ||
29 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
30 | DIRS = . | ||
31 | |||
32 | ifndef SIMVER | ||
33 | ifneq (,$(findstring RECORDER,$(TARGET))) ## Archos recorder targets | ||
34 | LDS := archos.lds | ||
35 | OUTPUT = $(OUTDIR)/rockboy.ovl | ||
36 | else ## iRiver target | ||
37 | LDS := ../plugin.lds | ||
38 | OUTPUT = $(OUTDIR)/rockboy.rock | ||
39 | endif | ||
40 | else ## simulators | ||
41 | OUTPUT = $(OUTDIR)/rockboy.rock | ||
42 | endif | ||
43 | |||
44 | all: $(OUTPUT) | ||
45 | |||
46 | ifndef SIMVER | ||
47 | $(OBJDIR)/rockboy.elf: $(OBJS) $(LINKFILE) | ||
48 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -fast -lgcc \ | ||
49 | -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/rockboy.map | ||
50 | |||
51 | $(OUTPUT): $(OBJDIR)/rockboy.elf | ||
52 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
53 | else | ||
54 | |||
55 | ifeq ($(SIMVER), x11) | ||
56 | ################################################### | ||
57 | # This is the X11 simulator version | ||
58 | |||
59 | $(OUTPUT): $(OBJS) | ||
60 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | ||
61 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
62 | # 'x' must be kept or you'll have "Win32 error 5" | ||
63 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
64 | # #define ERROR_ACCESS_DENIED 5L | ||
65 | else | ||
66 | @chmod -x $@ | ||
67 | endif | ||
68 | |||
69 | else # end of x11-simulator | ||
70 | ifeq ($(SIMVER), sdl) | ||
71 | ################################################### | ||
72 | # This is the sdl simulator version | ||
73 | |||
74 | $(OUTPUT): $(OBJS) | ||
75 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | ||
76 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
77 | # 'x' must be kept or you'll have "Win32 error 5" | ||
78 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
79 | # #define ERROR_ACCESS_DENIED 5L | ||
80 | else | ||
81 | @chmod -x $@ | ||
82 | endif | ||
83 | |||
84 | else # end of sdl-simulator | ||
85 | ################################################### | ||
86 | # This is the win32 simulator version | ||
87 | DLLTOOLFLAGS = --export-all | ||
88 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | ||
89 | |||
90 | $(OUTPUT): $(OBJS) | ||
91 | $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) | ||
92 | $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ | ||
93 | $(BUILDDIR)/libplugin.a -o $@ | ||
94 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
95 | # 'x' must be kept or you'll have "Win32 error 5" | ||
96 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
97 | # #define ERROR_ACCESS_DENIED 5L | ||
98 | else | ||
99 | @chmod -x $@ | ||
100 | endif | ||
101 | endif # end of win32-simulator | ||
102 | endif | ||
103 | endif # end of simulator section | ||
104 | |||
105 | |||
106 | include $(TOOLSDIR)/make.inc | ||
107 | |||
108 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
109 | # given in number of MB | ||
110 | $(LINKFILE): $(LDS) | ||
111 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \ | ||
112 | -E -P - >$@ | ||
113 | |||
114 | clean: | ||
115 | $(call PRINTS,cleaning rockboy)rm -rf $(OBJDIR)/rockboy | ||
116 | $(SILENT)rm -f $(OBJDIR)/rockboy.* $(DEPFILE) | ||
117 | |||
118 | -include $(DEPFILE) | ||
119 | |||
diff --git a/apps/plugins/rockboy/SOURCES b/apps/plugins/rockboy/SOURCES new file mode 100644 index 0000000000..8806b58389 --- /dev/null +++ b/apps/plugins/rockboy/SOURCES | |||
@@ -0,0 +1,16 @@ | |||
1 | cpu.c | ||
2 | emu.c | ||
3 | events.c | ||
4 | fastmem.c | ||
5 | hw.c | ||
6 | lcd.c | ||
7 | lcdc.c | ||
8 | loader.c | ||
9 | mem.c | ||
10 | menu.c | ||
11 | rbsound.c | ||
12 | rockboy.c | ||
13 | rtc.c | ||
14 | save.c | ||
15 | sound.c | ||
16 | sys_rockbox.c | ||
diff --git a/apps/plugins/rockboy/rockboy.make b/apps/plugins/rockboy/rockboy.make new file mode 100644 index 0000000000..62196cf0b7 --- /dev/null +++ b/apps/plugins/rockboy/rockboy.make | |||
@@ -0,0 +1,53 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | ROCKBOY_SRCDIR = $(APPSDIR)/plugins/rockboy | ||
11 | ROCKBOY_OBJDIR = $(BUILDDIR)/apps/plugins/rockboy | ||
12 | |||
13 | ROCKBOY_SRC := $(call preprocess, $(ROCKBOY_SRCDIR)/SOURCES) | ||
14 | ROCKBOY_OBJ := $(call c2obj, $(ROCKBOY_SRC)) | ||
15 | ROCKBOY_OBJ += $(ROCKBOY_OBJDIR)/sscanf.o | ||
16 | |||
17 | OTHER_SRC += $(ROCKBOY_SRC) | ||
18 | |||
19 | ifndef SIMVER | ||
20 | ifneq (,$(findstring RECORDER,$(TARGET))) | ||
21 | ## archos recorder targets | ||
22 | ROCKBOY_INLDS := $(ROCKBOY_SRCDIR)/archos.lds | ||
23 | ROCKS += $(ROCKBOY_OBJDIR)/rockboy.ovl | ||
24 | else | ||
25 | ### all other targets | ||
26 | ROCKBOY_INLDS := $(APPSDIR)/plugins/plugin.lds | ||
27 | ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock | ||
28 | endif | ||
29 | ROCKBOY_OVLFLAGS = -T$(ROCKBOY_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(ROCKBOY_OBJDIR)/$*.map | ||
30 | ROCKBOY_OUTLDS = $(ROCKBOY_OBJDIR)/rockboy.lds | ||
31 | else | ||
32 | ### simulator | ||
33 | ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock | ||
34 | ROCKBOY_OVLFLAGS = $(SHARED_FLAG) # <-- from Makefile | ||
35 | endif | ||
36 | |||
37 | $(ROCKBOY_OBJDIR)/sscanf.c: $(FIRMDIR)/common/sscanf.c | ||
38 | $(SILENT)mkdir -p $(dir $@) | ||
39 | $(call PRINTS,CP $<)cp $< $@ | ||
40 | |||
41 | $(ROCKBOY_OBJDIR)/sscanf.o: $(ROCKBOY_OBJDIR)/sscanf.c | ||
42 | |||
43 | $(ROCKBOY_OUTLDS): $(ROCKBOY_INLDS) $(ROCKBOY_OBJ) | ||
44 | $(call PRINTS,PP $(<F))$(call preprocess2file,$<,$@) | ||
45 | |||
46 | $(ROCKBOY_OBJDIR)/rockboy.rock: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS) $(PLUGINBITMAPLIB) | ||
47 | |||
48 | $(ROCKBOY_OBJDIR)/rockboy.ovl: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS) $(PLUGINBITMAPLIB) | ||
49 | $(SILENT)$(CC) $(PLUGINFLAGS) -o $(ROCKBOY_OBJDIR)/$*.elf \ | ||
50 | $(filter %.o, $^) \ | ||
51 | $(filter %.a, $^) \ | ||
52 | -lgcc $(ROCKBOY_OVLFLAGS) | ||
53 | $(call PRINTS,LD $(@F))$(OC) -O binary $(ROCKBOY_OBJDIR)/$*.elf $@ | ||
diff --git a/apps/plugins/rocklife.c b/apps/plugins/rocklife.c index 55875257f9..e22cb33cae 100644 --- a/apps/plugins/rocklife.c +++ b/apps/plugins/rocklife.c | |||
@@ -61,8 +61,8 @@ | |||
61 | */ | 61 | */ |
62 | 62 | ||
63 | #include "plugin.h" | 63 | #include "plugin.h" |
64 | #include "pluginlib_actions.h" | 64 | #include "lib/pluginlib_actions.h" |
65 | #include "helper.h" | 65 | #include "lib/helper.h" |
66 | 66 | ||
67 | PLUGIN_HEADER | 67 | PLUGIN_HEADER |
68 | 68 | ||
diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c index 32c746cc3e..c9a0c6a840 100644 --- a/apps/plugins/rockpaint.c +++ b/apps/plugins/rockpaint.c | |||
@@ -29,7 +29,6 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "plugin.h" | 31 | #include "plugin.h" |
32 | #include "errno.h" | ||
33 | #include "lib/bmp.h" | 32 | #include "lib/bmp.h" |
34 | #include "lib/rgb_hsv.h" | 33 | #include "lib/rgb_hsv.h" |
35 | 34 | ||
diff --git a/apps/plugins/searchengine/Makefile b/apps/plugins/searchengine/Makefile deleted file mode 100644 index 7e3cca4940..0000000000 --- a/apps/plugins/searchengine/Makefile +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) | ||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) -O3 $(TARGET) $(EXTRA_DEFINES) \ | ||
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN | ||
14 | |||
15 | ifdef APPEXTRA | ||
16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
17 | endif | ||
18 | |||
19 | LINKFILE := $(OBJDIR)/link.lds | ||
20 | DEPFILE = $(OBJDIR)/dep-searchengine | ||
21 | SRC = searchengine.c parser.c token.c dbinterface.c | ||
22 | |||
23 | SOURCES = $(SRC) | ||
24 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
25 | DIRS = . | ||
26 | |||
27 | LDS := ../plugin.lds | ||
28 | OUTPUT = $(OUTDIR)/searchengine.rock | ||
29 | |||
30 | all: $(OUTPUT) | ||
31 | |||
32 | ifndef SIMVER | ||
33 | $(OBJDIR)/searchengine.elf: $(OBJS) $(LINKFILE) | ||
34 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
35 | -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/searchengine.map | ||
36 | |||
37 | $(OUTPUT): $(OBJDIR)/searchengine.elf | ||
38 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
39 | else | ||
40 | |||
41 | ifeq ($(SIMVER), x11) | ||
42 | ################################################### | ||
43 | # This is the X11 simulator version | ||
44 | |||
45 | $(OUTPUT): $(OBJS) | ||
46 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | ||
47 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
48 | # 'x' must be kept or you'll have "Win32 error 5" | ||
49 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
50 | # #define ERROR_ACCESS_DENIED 5L | ||
51 | else | ||
52 | @chmod -x $@ | ||
53 | endif | ||
54 | |||
55 | else # end of x11-simulator | ||
56 | ifeq ($(SIMVER), sdl) | ||
57 | ################################################### | ||
58 | # This is the SDL simulator version | ||
59 | |||
60 | $(OUTPUT): $(OBJS) | ||
61 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | ||
62 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
63 | # 'x' must be kept or you'll have "Win32 error 5" | ||
64 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
65 | # #define ERROR_ACCESS_DENIED 5L | ||
66 | else | ||
67 | @chmod -x $@ | ||
68 | endif | ||
69 | |||
70 | else # end of sdl-simulator | ||
71 | ################################################### | ||
72 | # This is the win32 simulator version | ||
73 | DLLTOOLFLAGS = --export-all | ||
74 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | ||
75 | |||
76 | $(OUTPUT): $(OBJS) | ||
77 | $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) | ||
78 | $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ | ||
79 | $(BUILDDIR)/libplugin.a -o $@ | ||
80 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
81 | # 'x' must be kept or you'll have "Win32 error 5" | ||
82 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
83 | # #define ERROR_ACCESS_DENIED 5L | ||
84 | else | ||
85 | @chmod -x $@ | ||
86 | endif | ||
87 | endif # end of win32-simulator | ||
88 | endif | ||
89 | endif # end of simulator section | ||
90 | |||
91 | |||
92 | include $(TOOLSDIR)/make.inc | ||
93 | |||
94 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
95 | # given in number of MB | ||
96 | $(LINKFILE): $(LDS) | ||
97 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
98 | $(DEFINES) -E -P - >$@ | ||
99 | |||
100 | clean: | ||
101 | $(call PRINTS,cleaning searchengine)rm -rf $(OBJDIR)/searchengine | ||
102 | $(SILENT)rm -f $(OBJDIR)/searchengine.* $(DEPFILE) | ||
103 | |||
104 | -include $(DEPFILE) | ||
105 | |||
diff --git a/apps/plugins/shortcuts/Makefile b/apps/plugins/shortcuts/Makefile deleted file mode 100644 index 2958af8818..0000000000 --- a/apps/plugins/shortcuts/Makefile +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $$Id: $$ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \ | ||
12 | -I$(BUILDDIR)/pluginbitmaps | ||
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 | LINKFILE := $(OBJDIR)/link.lds | ||
21 | DEPFILE = $(OBJDIR)/dep-shortcuts | ||
22 | |||
23 | SOURCES := shortcuts_common.c shortcuts_view.c shortcuts_append.c | ||
24 | VIEW_OBJS := $(OBJDIR)/shortcuts_common.o $(OBJDIR)/shortcuts_view.o | ||
25 | APPEND_OBJS := $(OBJDIR)/shortcuts_common.o $(OBJDIR)/shortcuts_append.o | ||
26 | DIRS = . | ||
27 | |||
28 | ifndef SIMVER | ||
29 | LDS := ../plugin.lds | ||
30 | endif | ||
31 | |||
32 | OUTPUT = $(OUTDIR)/shortcuts_view.rock $(OUTDIR)/shortcuts_append.rock | ||
33 | |||
34 | all: $(OUTPUT) | ||
35 | |||
36 | ifndef SIMVER | ||
37 | $(OBJDIR)/shortcuts_view.elf: $(VIEW_OBJS) $(LINKFILE) $(BITMAPLIBS) | ||
38 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(VIEW_OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
39 | $(LINKBITMAPS) -Wl,--gc-sections -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/shortcuts_view.map | ||
40 | |||
41 | $(OUTDIR)/shortcuts_view.rock: $(OBJDIR)/shortcuts_view.elf | ||
42 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
43 | |||
44 | $(OBJDIR)/shortcuts_append.elf: $(APPEND_OBJS) $(LINKFILE) $(BITMAPLIBS) | ||
45 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(APPEND_OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
46 | $(LINKBITMAPS) -Wl,--gc-sections -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/shortcuts_append.map | ||
47 | |||
48 | $(OUTDIR)/shortcuts_append.rock: $(OBJDIR)/shortcuts_append.elf | ||
49 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
50 | else | ||
51 | |||
52 | ################################################### | ||
53 | # This is the SDL simulator version | ||
54 | |||
55 | $(OUTDIR)/shortcuts_view.rock: $(VIEW_OBJS) | ||
56 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(VIEW_OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
57 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
58 | # 'x' must be kept or you'll have "Win32 error 5" | ||
59 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
60 | # #define ERROR_ACCESS_DENIED 5L | ||
61 | else | ||
62 | @chmod -x $@ | ||
63 | endif | ||
64 | |||
65 | $(OUTDIR)/shortcuts_append.rock: $(APPEND_OBJS) | ||
66 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(APPEND_OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
67 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
68 | # 'x' must be kept or you'll have "Win32 error 5" | ||
69 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
70 | # #define ERROR_ACCESS_DENIED 5L | ||
71 | else | ||
72 | @chmod -x $@ | ||
73 | endif | ||
74 | |||
75 | endif # end of simulator section | ||
76 | |||
77 | |||
78 | include $(TOOLSDIR)/make.inc | ||
79 | |||
80 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
81 | # given in number of MB | ||
82 | $(LINKFILE): $(LDS) | ||
83 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
84 | $(DEFINES) -E -P - >$@ | ||
85 | |||
86 | clean: | ||
87 | $(call PRINTS,cleaning shortcuts)rm -rf $(OBJDIR)/shortcuts | ||
88 | $(SILENT)rm -f $(OBJDIR)/shortcuts* $(DEPFILE) | ||
89 | |||
90 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/shortcuts/shortcuts.make b/apps/plugins/shortcuts/shortcuts.make new file mode 100644 index 0000000000..fc2a77a2f5 --- /dev/null +++ b/apps/plugins/shortcuts/shortcuts.make | |||
@@ -0,0 +1,25 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | SHCUTSRCDIR := $(APPSDIR)/plugins/shortcuts | ||
11 | SHCUTBUILDDIR := $(BUILDDIR)/apps/plugins/shortcuts | ||
12 | |||
13 | ROCKS += $(SHCUTBUILDDIR)/shortcuts_view.rock | ||
14 | ROCKS += $(SHCUTBUILDDIR)/shortcuts_append.rock | ||
15 | |||
16 | # add source files to OTHER_SRC to get automatic dependencies | ||
17 | OTHER_SRC += $(SHCUTSRCDIR)/shortcuts_common.c \ | ||
18 | $(SHCUTSRCDIR)/shortcuts_view.c \ | ||
19 | $(SHCUTSRCDIR)/shortcuts_append.c | ||
20 | |||
21 | $(SHCUTBUILDDIR)/shortcuts_view.rock: \ | ||
22 | $(SHCUTBUILDDIR)/shortcuts_common.o $(SHCUTBUILDDIR)/shortcuts_view.o | ||
23 | |||
24 | $(SHCUTBUILDDIR)/shortcuts_append.rock: \ | ||
25 | $(SHCUTBUILDDIR)/shortcuts_common.o $(SHCUTBUILDDIR)/shortcuts_append.o | ||
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c index ef33a4f642..0d12556696 100644 --- a/apps/plugins/sliding_puzzle.c +++ b/apps/plugins/sliding_puzzle.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "bmp.h" | 22 | #include "lib/bmp.h" |
23 | 23 | ||
24 | #ifdef HAVE_LCD_BITMAP | 24 | #ifdef HAVE_LCD_BITMAP |
25 | PLUGIN_HEADER | 25 | PLUGIN_HEADER |
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c index 056ab7818b..28315cc34f 100644 --- a/apps/plugins/snow.c +++ b/apps/plugins/snow.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | **************************************************************************/ | 20 | **************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "playergfx.h" | 22 | #include "lib/playergfx.h" |
23 | 23 | ||
24 | PLUGIN_HEADER | 24 | PLUGIN_HEADER |
25 | 25 | ||
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 9b9cd29e0a..0a032f6bd1 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c | |||
@@ -34,6 +34,14 @@ PLUGIN_HEADER | |||
34 | 34 | ||
35 | #include "pluginbitmaps/sokoban_tiles.h" | 35 | #include "pluginbitmaps/sokoban_tiles.h" |
36 | #define SOKOBAN_TILESIZE BMPWIDTH_sokoban_tiles | 36 | #define SOKOBAN_TILESIZE BMPWIDTH_sokoban_tiles |
37 | |||
38 | /* If tilesize is 0 (which it is during dependency generation) gcc will abort | ||
39 | (div by 0) and this plugin won't get any dependencies | ||
40 | */ | ||
41 | #if SOKOBAN_TILESIZE < 1 | ||
42 | #define SOKOBAN_TILESIZE 10 | ||
43 | #endif | ||
44 | |||
37 | /* SOKOBAN_TILESIZE is the number of pixels for each block. | 45 | /* SOKOBAN_TILESIZE is the number of pixels for each block. |
38 | * Set dynamically so all targets can support levels | 46 | * Set dynamically so all targets can support levels |
39 | * that fill their entire screen, less the stat box. | 47 | * that fill their entire screen, less the stat box. |
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index d48733461d..f95777e024 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c | |||
@@ -20,11 +20,11 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | #include "playback_control.h" | 23 | #include "lib/playback_control.h" |
24 | #include "configfile.h" | 24 | #include "lib/configfile.h" |
25 | #include "button.h" | 25 | #include "button.h" |
26 | #include "lcd.h" | 26 | #include "lcd.h" |
27 | #include "oldmenuapi.h" | 27 | #include "lib/oldmenuapi.h" |
28 | 28 | ||
29 | #ifdef HAVE_LCD_BITMAP | 29 | #ifdef HAVE_LCD_BITMAP |
30 | 30 | ||
diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c index 21cfb1e794..b8cf043125 100644 --- a/apps/plugins/spacerocks.c +++ b/apps/plugins/spacerocks.c | |||
@@ -20,9 +20,7 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | #include "math.h" | 23 | #include "lib/helper.h" |
24 | #include "stdio.h" | ||
25 | #include "helper.h" | ||
26 | 24 | ||
27 | PLUGIN_HEADER | 25 | PLUGIN_HEADER |
28 | 26 | ||
diff --git a/apps/plugins/starfield.c b/apps/plugins/starfield.c index f8f24b93d4..536213686a 100644 --- a/apps/plugins/starfield.c +++ b/apps/plugins/starfield.c | |||
@@ -18,7 +18,7 @@ | |||
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | 19 | ||
20 | #include "plugin.h" | 20 | #include "plugin.h" |
21 | #include "helper.h" | 21 | #include "lib/helper.h" |
22 | 22 | ||
23 | #ifdef HAVE_LCD_BITMAP /* and also not for the Player */ | 23 | #ifdef HAVE_LCD_BITMAP /* and also not for the Player */ |
24 | 24 | ||
diff --git a/apps/plugins/sudoku/Makefile b/apps/plugins/sudoku/Makefile deleted file mode 100644 index 948b315a32..0000000000 --- a/apps/plugins/sudoku/Makefile +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \ | ||
12 | -I$(BUILDDIR)/pluginbitmaps | ||
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 | LINKFILE := $(OBJDIR)/link.lds | ||
21 | DEPFILE = $(OBJDIR)/dep-sudoku | ||
22 | |||
23 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
24 | include $(TOOLSDIR)/makesrc.inc | ||
25 | |||
26 | SOURCES = $(SRC) | ||
27 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
28 | DIRS = . | ||
29 | |||
30 | ifndef SIMVER | ||
31 | LDS := ../plugin.lds | ||
32 | OUTPUT = $(OUTDIR)/sudoku.rock | ||
33 | else ## simulators | ||
34 | OUTPUT = $(OUTDIR)/sudoku.rock | ||
35 | endif | ||
36 | |||
37 | all: $(OUTPUT) | ||
38 | |||
39 | ifndef SIMVER | ||
40 | $(OBJDIR)/sudoku.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) | ||
41 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
42 | $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/sudoku.map | ||
43 | |||
44 | $(OUTPUT): $(OBJDIR)/sudoku.elf | ||
45 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
46 | else | ||
47 | ################################################### | ||
48 | # This is the SDL simulator version | ||
49 | |||
50 | $(OUTPUT): $(OBJS) | ||
51 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
52 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
53 | # 'x' must be kept or you'll have "Win32 error 5" | ||
54 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
55 | # #define ERROR_ACCESS_DENIED 5L | ||
56 | else | ||
57 | @chmod -x $@ | ||
58 | endif | ||
59 | |||
60 | endif # end of simulator section | ||
61 | |||
62 | |||
63 | include $(TOOLSDIR)/make.inc | ||
64 | |||
65 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
66 | # given in number of MB | ||
67 | $(LINKFILE): $(LDS) | ||
68 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
69 | $(DEFINES) -E -P - >$@ | ||
70 | |||
71 | clean: | ||
72 | $(call PRINTS,cleaning sudoku)rm -rf $(OBJDIR)/sudoku | ||
73 | $(SILENT)rm -f $(OBJDIR)/sudoku.* $(DEPFILE) | ||
74 | |||
75 | -include $(DEPFILE) | ||
diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c index 150edaba54..4430778cac 100644 --- a/apps/plugins/sudoku/sudoku.c +++ b/apps/plugins/sudoku/sudoku.c | |||
@@ -69,9 +69,9 @@ Example ".ss" file, and one with a saved state: | |||
69 | #include "generator.h" | 69 | #include "generator.h" |
70 | 70 | ||
71 | /* The bitmaps */ | 71 | /* The bitmaps */ |
72 | #include "sudoku_normal.h" | 72 | #include "pluginbitmaps/sudoku_normal.h" |
73 | #include "sudoku_inverse.h" | 73 | #include "pluginbitmaps/sudoku_inverse.h" |
74 | #include "sudoku_start.h" | 74 | #include "pluginbitmaps/sudoku_start.h" |
75 | 75 | ||
76 | #define BITMAP_HEIGHT (BMPHEIGHT_sudoku_normal/10) | 76 | #define BITMAP_HEIGHT (BMPHEIGHT_sudoku_normal/10) |
77 | #define BITMAP_STRIDE BMPWIDTH_sudoku_normal | 77 | #define BITMAP_STRIDE BMPWIDTH_sudoku_normal |
diff --git a/apps/plugins/sudoku/sudoku.make b/apps/plugins/sudoku/sudoku.make new file mode 100644 index 0000000000..e1f397c121 --- /dev/null +++ b/apps/plugins/sudoku/sudoku.make | |||
@@ -0,0 +1,21 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | SUDOKUSRCDIR := $(APPSDIR)/plugins/sudoku | ||
11 | SUDOKUBUILDDIR := $(BUILDDIR)/apps/plugins/sudoku | ||
12 | |||
13 | ROCKS += $(SUDOKUBUILDDIR)/sudoku.rock | ||
14 | |||
15 | SUDOKU_SRC := $(call preprocess, $(SUDOKUSRCDIR)/SOURCES) | ||
16 | SUDOKU_OBJ := $(call c2obj, $(SUDOKU_SRC)) | ||
17 | |||
18 | # add source files to OTHER_SRC to get automatic dependencies | ||
19 | OTHER_SRC += $(SUDOKU_SRC) | ||
20 | |||
21 | $(SUDOKUBUILDDIR)/sudoku.rock: $(SUDOKU_OBJ) | ||
diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c index 2e421e151e..085435e4c9 100644 --- a/apps/plugins/test_disk.c +++ b/apps/plugins/test_disk.c | |||
@@ -20,8 +20,8 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | #include "oldmenuapi.h" | 23 | #include "lib/oldmenuapi.h" |
24 | #include "helper.h" | 24 | #include "lib/helper.h" |
25 | 25 | ||
26 | PLUGIN_HEADER | 26 | PLUGIN_HEADER |
27 | 27 | ||
diff --git a/apps/plugins/test_fps.c b/apps/plugins/test_fps.c index 7148cfc8b7..6d347738b7 100644 --- a/apps/plugins/test_fps.c +++ b/apps/plugins/test_fps.c | |||
@@ -19,8 +19,8 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "helper.h" | 22 | #include "lib/helper.h" |
23 | #include "grey.h" | 23 | #include "lib/grey.h" |
24 | 24 | ||
25 | #ifdef HAVE_LCD_BITMAP | 25 | #ifdef HAVE_LCD_BITMAP |
26 | 26 | ||
diff --git a/apps/plugins/test_resize.c b/apps/plugins/test_resize.c index 108360b69a..b0ef787d36 100644 --- a/apps/plugins/test_resize.c +++ b/apps/plugins/test_resize.c | |||
@@ -25,8 +25,8 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "plugin.h" | 27 | #include "plugin.h" |
28 | #include "pluginlib_actions.h" | 28 | #include "lib/pluginlib_actions.h" |
29 | #include "bmp.h" | 29 | #include "lib/bmp.h" |
30 | 30 | ||
31 | PLUGIN_HEADER | 31 | PLUGIN_HEADER |
32 | 32 | ||
diff --git a/apps/plugins/test_sampr.c b/apps/plugins/test_sampr.c index 7073494d63..01f24b5987 100644 --- a/apps/plugins/test_sampr.c +++ b/apps/plugins/test_sampr.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "oldmenuapi.h" | 22 | #include "lib/oldmenuapi.h" |
23 | 23 | ||
24 | PLUGIN_HEADER | 24 | PLUGIN_HEADER |
25 | 25 | ||
diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index 6910c6c7e2..c9d973fe22 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "playback_control.h" | 22 | #include "lib/playback_control.h" |
23 | 23 | ||
24 | #if PLUGIN_BUFFER_SIZE > 0x45000 | 24 | #if PLUGIN_BUFFER_SIZE > 0x45000 |
25 | #define MAX_CHARS 0x40000 /* 128 kiB */ | 25 | #define MAX_CHARS 0x40000 /* 128 kiB */ |
diff --git a/apps/plugins/video.c b/apps/plugins/video.c index 69c6f4ed9e..a31b7c5415 100644 --- a/apps/plugins/video.c +++ b/apps/plugins/video.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "plugin.h" | 29 | #include "plugin.h" |
30 | #include "sh7034.h" | 30 | #include "sh7034.h" |
31 | #include "system.h" | 31 | #include "system.h" |
32 | #include "helper.h" | 32 | #include "lib/helper.h" |
33 | 33 | ||
34 | #ifndef SIMULATOR /* not for simulator by now */ | 34 | #ifndef SIMULATOR /* not for simulator by now */ |
35 | #ifdef HAVE_LCD_BITMAP /* and definitely not for the Player, haha */ | 35 | #ifdef HAVE_LCD_BITMAP /* and definitely not for the Player, haha */ |
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index 51fb791b1d..e85a979bd5 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c | |||
@@ -21,8 +21,8 @@ | |||
21 | ****************************************************************************/ | 21 | ****************************************************************************/ |
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | #include <ctype.h> | 23 | #include <ctype.h> |
24 | #include "playback_control.h" | 24 | #include "lib/playback_control.h" |
25 | #include "oldmenuapi.h" | 25 | #include "lib/oldmenuapi.h" |
26 | 26 | ||
27 | PLUGIN_HEADER | 27 | PLUGIN_HEADER |
28 | 28 | ||
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index 405f6df01d..f07eb098a3 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * | 18 | * |
19 | **************************************************************************/ | 19 | **************************************************************************/ |
20 | #include "plugin.h" | 20 | #include "plugin.h" |
21 | #include "fixedpoint.h" | 21 | #include "lib/fixedpoint.h" |
22 | 22 | ||
23 | #if defined(HAVE_LCD_BITMAP) | 23 | #if defined(HAVE_LCD_BITMAP) |
24 | 24 | ||
diff --git a/apps/plugins/wavrecord.c b/apps/plugins/wavrecord.c index d4b8bf1fd2..c26e2c4973 100644 --- a/apps/plugins/wavrecord.c +++ b/apps/plugins/wavrecord.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "configfile.h" | 22 | #include "lib/configfile.h" |
23 | 23 | ||
24 | PLUGIN_HEADER | 24 | PLUGIN_HEADER |
25 | 25 | ||
diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index 6586e78b2c..5411d0cb68 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c | |||
@@ -19,8 +19,8 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "configfile.h" | 22 | #include "lib/configfile.h" |
23 | #include "helper.h" | 23 | #include "lib/helper.h" |
24 | 24 | ||
25 | PLUGIN_HEADER | 25 | PLUGIN_HEADER |
26 | 26 | ||
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index 59e080d2e0..d345c4404f 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c | |||
@@ -21,7 +21,7 @@ | |||
21 | ****************************************************************************/ | 21 | ****************************************************************************/ |
22 | 22 | ||
23 | #include "plugin.h" | 23 | #include "plugin.h" |
24 | #include "helper.h" | 24 | #include "lib/helper.h" |
25 | 25 | ||
26 | PLUGIN_HEADER | 26 | PLUGIN_HEADER |
27 | 27 | ||
diff --git a/apps/plugins/zxbox.c b/apps/plugins/zxbox.c index 10e43c4a42..3c1c78f9d2 100644 --- a/apps/plugins/zxbox.c +++ b/apps/plugins/zxbox.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #if MEM <= 8 && !defined(SIMULATOR) | 22 | #if MEM <= 8 && !defined(SIMULATOR) |
23 | 23 | ||
24 | #include "overlay.h" | 24 | #include "lib/overlay.h" |
25 | 25 | ||
26 | PLUGIN_HEADER | 26 | PLUGIN_HEADER |
27 | 27 | ||
diff --git a/apps/plugins/zxbox/Makefile b/apps/plugins/zxbox/Makefile deleted file mode 100644 index d7862c514b..0000000000 --- a/apps/plugins/zxbox/Makefile +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # | ||
8 | OPT_FLAGS=-O3 -funroll-loops | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) -I. $(TARGET_INC) | ||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ | ||
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN $(OPT_FLAGS) $(PROFILE_OPTS) | ||
14 | |||
15 | ifdef APPEXTRA | ||
16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
17 | endif | ||
18 | |||
19 | LINKFILE := $(OBJDIR)/link.lds | ||
20 | DEPFILE = $(OBJDIR)/dep-zxbox | ||
21 | |||
22 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
23 | include $(TOOLSDIR)/makesrc.inc | ||
24 | |||
25 | SOURCES = $(SRC) | ||
26 | OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) | ||
27 | OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) | ||
28 | DIRS = . | ||
29 | |||
30 | ifndef SIMVER | ||
31 | ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) | ||
32 | LDS := archos.lds | ||
33 | OUTPUT = $(OUTDIR)/zxbox.ovl | ||
34 | else ## iRiver/iPod/... targets | ||
35 | LDS := ../plugin.lds | ||
36 | OUTPUT = $(OUTDIR)/zxbox.rock | ||
37 | endif | ||
38 | else ## simulators | ||
39 | OUTPUT = $(OUTDIR)/zxbox.rock | ||
40 | endif | ||
41 | |||
42 | all: $(OUTPUT) | ||
43 | |||
44 | ifndef SIMVER | ||
45 | $(OBJDIR)/zxbox.elf: $(OBJS) $(LINKFILE) | ||
46 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
47 | -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/zxbox.map | ||
48 | |||
49 | $(OUTPUT): $(OBJDIR)/zxbox.elf | ||
50 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ | ||
51 | else | ||
52 | |||
53 | ifeq ($(SIMVER), sdl) | ||
54 | ################################################### | ||
55 | # This is the SDL simulator version | ||
56 | |||
57 | $(OUTPUT): $(OBJS) | ||
58 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | ||
59 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
60 | # 'x' must be kept or you'll have "Win32 error 5" | ||
61 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
62 | # #define ERROR_ACCESS_DENIED 5L | ||
63 | else | ||
64 | @chmod -x $@ | ||
65 | endif | ||
66 | |||
67 | endif | ||
68 | endif # end of simulator section | ||
69 | |||
70 | |||
71 | include $(TOOLSDIR)/make.inc | ||
72 | |||
73 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
74 | # given in number of MB | ||
75 | $(LINKFILE): $(LDS) | ||
76 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
77 | $(DEFINES) -E -P - >$@ | ||
78 | |||
79 | clean: | ||
80 | $(call PRINTS,cleaning zxbox)rm -rf $(OBJDIR)/zxbox | ||
81 | $(SILENT)rm -f $(OBJDIR)/zxbox.* $(DEPFILE) | ||
82 | |||
83 | -include $(DEPFILE) | ||
84 | |||
diff --git a/apps/plugins/zxbox/spmain.c b/apps/plugins/zxbox/spmain.c index 6c586566f9..bc5df48059 100644 --- a/apps/plugins/zxbox/spmain.c +++ b/apps/plugins/zxbox/spmain.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #include <stdlib.h> | 43 | #include <stdlib.h> |
44 | #include <errno.h> | 44 | #include <errno.h> |
45 | #ifdef USE_GREY | 45 | #ifdef USE_GREY |
46 | #include "../lib/grey.h" | 46 | #include "lib/grey.h" |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #include "zxbox_keyb.h" | 49 | #include "zxbox_keyb.h" |
diff --git a/apps/plugins/zxbox/zxbox.make b/apps/plugins/zxbox/zxbox.make new file mode 100644 index 0000000000..e617ba3a12 --- /dev/null +++ b/apps/plugins/zxbox/zxbox.make | |||
@@ -0,0 +1,57 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | ZXBOX_SRCDIR = $(APPSDIR)/plugins/zxbox | ||
11 | ZXBOX_OBJDIR = $(BUILDDIR)/apps/plugins/zxbox | ||
12 | |||
13 | ZXBOX_SRC := $(call preprocess, $(ZXBOX_SRCDIR)/SOURCES) | ||
14 | ZXBOX_OBJ := $(call c2obj, $(ZXBOX_SRC)) | ||
15 | |||
16 | OTHER_SRC += $(ZXBOX_SRC) | ||
17 | |||
18 | ifndef SIMVER | ||
19 | ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) | ||
20 | ## archos recorder targets | ||
21 | ZXBOX_INLDS := $(ZXBOX_SRCDIR)/archos.lds | ||
22 | ROCKS += $(ZXBOX_OBJDIR)/zxbox.ovl | ||
23 | else | ||
24 | ### all other targets | ||
25 | ZXBOX_INLDS := $(APPSDIR)/plugins/plugin.lds | ||
26 | ROCKS += $(ZXBOX_OBJDIR)/zxbox.rock | ||
27 | endif | ||
28 | else | ||
29 | ### simulator | ||
30 | ROCKS += $(ZXBOX_OBJDIR)/zxbox.rock | ||
31 | endif | ||
32 | |||
33 | ZXBOXFLAGS = $(filter-out -O%,$(PLUGINFLAGS)) -O3 -funroll-loops | ||
34 | |||
35 | ifdef SIMVER | ||
36 | ZXBOX_LDFLAGS = $(SHARED_FLAG) # <-- from Makefile | ||
37 | else | ||
38 | ZXBOX_OUTLDS = $(ZXBOX_OBJDIR)/zxbox.lds | ||
39 | ZXBOX_LDFLAGS = -T$(ZXBOX_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/$*.map | ||
40 | endif | ||
41 | |||
42 | $(ZXBOX_OUTLDS): $(ZXBOX_INLDS) $(ZXBOX_OBJ) | ||
43 | $(call PRINTS,PP $(<F))$(call preprocess2file,$<,$@) | ||
44 | |||
45 | $(ZXBOX_OBJDIR)/zxbox.rock: $(ZXBOX_OBJ) $(ZXBOX_OUTLDS) $(PLUGINBITMAPLIB) | ||
46 | |||
47 | $(ZXBOX_OBJDIR)/zxbox.ovl: $(ZXBOX_OBJ) $(ZXBOX_OUTLDS) $(PLUGINBITMAPLIB) $(PLUGINLIB) | ||
48 | $(SILENT)$(CC) $(PLUGINFLAGS) -o $(ZXBOX_OBJDIR)/$*.elf \ | ||
49 | $(filter %.o, $^) \ | ||
50 | $(filter %.a, $^) \ | ||
51 | -lgcc $(ZXBOX_LDFLAGS) | ||
52 | $(call PRINTS,LD $(@F))$(OC) -O binary $(ZXBOX_OBJDIR)/$*.elf $@ | ||
53 | |||
54 | # special pattern rule for compiling zxbox with extra flags | ||
55 | $(ZXBOX_OBJDIR)/%.o: $(ZXBOX_SRCDIR)/%.c $(PLUGINBITMAPLIB) $(ZXBOX_SRCDIR)/zxbox.make | ||
56 | $(SILENT)mkdir -p $(dir $@) | ||
57 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(ZXBOXFLAGS) -c $< -o $@ | ||
diff --git a/apps/plugins/zxbox/zxvid_com.h b/apps/plugins/zxbox/zxvid_com.h index 2ef67c6385..1e23ca03e3 100644 --- a/apps/plugins/zxbox/zxvid_com.h +++ b/apps/plugins/zxbox/zxvid_com.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #include "zxconfig.h" | 3 | #include "zxconfig.h" |
4 | 4 | ||
5 | #ifdef USE_GREY | 5 | #ifdef USE_GREY |
6 | #include "../lib/grey.h" | 6 | #include "lib/grey.h" |
7 | #endif | 7 | #endif |
8 | 8 | ||
9 | #include "spscr_p.h" | 9 | #include "spscr_p.h" |