summaryrefslogtreecommitdiff
path: root/apps/plugins/doom/Makefile
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2008-11-20 11:27:31 +0000
committerBjörn Stenberg <bjorn@haxx.se>2008-11-20 11:27:31 +0000
commitc6b3d38a156dd624760a8eb1bb374affd43b4f2a (patch)
tree493eba929e2396d86cf4f077709aa09fe172cd35 /apps/plugins/doom/Makefile
parentf66c30346783a400a029bedcd60ab67c81c34a07 (diff)
downloadrockbox-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/doom/Makefile')
-rw-r--r--apps/plugins/doom/Makefile173
1 files changed, 0 insertions, 173 deletions
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
47INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
48 -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR)
49CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
50 -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN \
51 -Wno-strict-prototypes $(PROFILE_OPTS)
52
53ifdef APPEXTRA
54 INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
55endif
56
57# The arm code compiles too large for the plugin buffer when set to optimize for speed
58ifeq ($(CPU), arm)
59 CFLAGS += -Os
60ifndef SIMVER
61ifeq ($(TARGET), IRIVER_H100)
62 CFLAGS += -mstructure-size-boundary=8
63endif
64endif
65else
66 CFLAGS += -O2
67endif
68
69LINKFILE := $(OBJDIR)/link.lds
70DEPFILE = $(OBJDIR)/dep-doom
71SRC = 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
85SOURCES = $(SRC)
86OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
87#OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
88#OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
89DIRS = .
90
91
92ifndef SIMVER
93 LDS := ../plugin.lds
94 OUTPUT = $(OUTDIR)/doom.rock
95else ## simulators
96 OUTPUT = $(OUTDIR)/doom.rock
97endif
98
99all: $(OUTPUT)
100
101ifndef 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 $< $@
108else
109
110ifeq ($(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 $@
116ifeq ($(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
120else
121 @chmod -x $@
122endif
123
124else # end of x11-simulator
125ifeq ($(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 $@
131ifeq ($(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
135else
136 @chmod -x $@
137endif
138
139else # end of sdl-simulator
140###################################################
141# This is the win32 simulator version
142DLLTOOLFLAGS = --export-all
143DLLWRAPFLAGS = -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 $@
149ifeq ($(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
153else
154 @chmod -x $@
155endif
156endif # end of win32-simulator
157endif
158endif # end of simulator section
159
160
161include $(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
169clean:
170 $(call PRINTS,cleaning doom)rm -rf $(OBJDIR)/doom
171 $(SILENT)rm -f $(OBJDIR)/doom.* $(DEPFILE)
172
173-include $(DEPFILE)