diff options
author | Dave Chapman <dave@dchapman.com> | 2006-03-11 15:44:35 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2006-03-11 15:44:35 +0000 |
commit | a814584c87fef79038f6b0f311cfc70fb51d1b95 (patch) | |
tree | 4df31679017735c7fa64b32ae78ec3ad078271ae /apps/plugins/pacbox/Makefile | |
parent | 1246668a7807f1f5b9253ad7f9a682fb6b2ff7dd (diff) | |
download | rockbox-a814584c87fef79038f6b0f311cfc70fb51d1b95.tar.gz rockbox-a814584c87fef79038f6b0f311cfc70fb51d1b95.zip |
pacbox - a Pacman arcade machine emulator. Currently working for all colour targets and the iriver H1x0. Requires the Pacman arcade machine ROMs in /.rockbox/pacman/
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9001 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pacbox/Makefile')
-rw-r--r-- | apps/plugins/pacbox/Makefile | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/apps/plugins/pacbox/Makefile b/apps/plugins/pacbox/Makefile new file mode 100644 index 0000000000..817c6d451a --- /dev/null +++ b/apps/plugins/pacbox/Makefile | |||
@@ -0,0 +1,113 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES = -I$(APPSDIR) -I.. -I. -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 | |||
16 | ifdef APPEXTRA | ||
17 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
18 | endif | ||
19 | |||
20 | LINKFILE := $(OBJDIR)/link.lds | ||
21 | DEPFILE = $(OBJDIR)/dep-pacbox | ||
22 | SRC = arcade.c pacbox.c hardware.c z80.c | ||
23 | |||
24 | SOURCES = $(SRC) | ||
25 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | ||
26 | DIRS = . | ||
27 | |||
28 | LDS := ../plugin.lds | ||
29 | OUTPUT = $(OUTDIR)/pacbox.rock | ||
30 | |||
31 | all: $(OUTPUT) | ||
32 | |||
33 | ifndef SIMVER | ||
34 | $(OBJDIR)/pacbox.elf: $(OBJS) $(LINKFILE) | ||
35 | @echo "LD "`basename $@` | ||
36 | @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
37 | -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/pacbox.map | ||
38 | |||
39 | $(OUTPUT): $(OBJDIR)/pacbox.elf | ||
40 | @echo "OBJCOPY "`basename $@` | ||
41 | @$(OC) -O binary $< $@ | ||
42 | else | ||
43 | |||
44 | ifeq ($(SIMVER), x11) | ||
45 | ################################################### | ||
46 | # This is the X11 simulator version | ||
47 | |||
48 | $(OUTPUT): $(OBJS) | ||
49 | @echo "LD $<" | ||
50 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | ||
51 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
52 | # 'x' must be kept or you'll have "Win32 error 5" | ||
53 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
54 | # #define ERROR_ACCESS_DENIED 5L | ||
55 | else | ||
56 | @chmod -x $@ | ||
57 | endif | ||
58 | |||
59 | else # end of x11-simulator | ||
60 | ifeq ($(SIMVER), sdl) | ||
61 | ################################################### | ||
62 | # This is the SDL simulator version | ||
63 | |||
64 | $(OUTPUT): $(OBJS) | ||
65 | @echo "LD $<" | ||
66 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -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 | else # end of sdl-simulator | ||
76 | ################################################### | ||
77 | # This is the win32 simulator version | ||
78 | DLLTOOLFLAGS = --export-all | ||
79 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | ||
80 | |||
81 | $(OUTPUT): $(OBJS) | ||
82 | @echo "DLL "`basename $@` | ||
83 | @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) | ||
84 | @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ | ||
85 | $(BUILDDIR)/libplugin.a -o $@ | ||
86 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
87 | # 'x' must be kept or you'll have "Win32 error 5" | ||
88 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | ||
89 | # #define ERROR_ACCESS_DENIED 5L | ||
90 | else | ||
91 | @chmod -x $@ | ||
92 | endif | ||
93 | endif # end of win32-simulator | ||
94 | endif | ||
95 | endif # end of simulator section | ||
96 | |||
97 | |||
98 | include $(TOOLSDIR)/make.inc | ||
99 | |||
100 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | ||
101 | # given in number of MB | ||
102 | $(LINKFILE): $(LDS) | ||
103 | @echo "build "`basename $@` | ||
104 | @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
105 | $(DEFINES) -E -P - >$@ | ||
106 | |||
107 | clean: | ||
108 | @echo "cleaning pacbox" | ||
109 | @rm -rf $(OBJDIR)/pacbox | ||
110 | @rm -f $(OBJDIR)/pacbox.* $(DEPFILE) | ||
111 | |||
112 | -include $(DEPFILE) | ||
113 | |||