diff options
Diffstat (limited to 'apps/plugins/sudoku')
-rw-r--r-- | apps/plugins/sudoku/Makefile | 75 | ||||
-rw-r--r-- | apps/plugins/sudoku/sudoku.c | 6 | ||||
-rw-r--r-- | apps/plugins/sudoku/sudoku.make | 21 |
3 files changed, 24 insertions, 78 deletions
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) | ||