2 # OpenBOR - http://www.LavaLit.com
3 # ---------------------------------------------------------------------------------------------------
4 # Licensed under the BSD license, see LICENSE in OpenBOR root for details.
6 # Copyright (c) 2004 - 2011 OpenBOR Team
10 VERSION_NAME
= OpenBOR
13 STRINGSWITCH_GEN
=..
/stringswitch
/stringswitch_gen.out
15 TARGET
= $(VERSION_NAME
)
28 INCLUDES
= $(SDKPATH
)/include \
29 $(SDKPATH
)/include/SDL
31 #----------------------------------------------------------------------------------------------------
33 #----------------------------------------------------------------------------------------------------
43 source
/preprocessorlib \
55 #----------------------------------------------------------------------------------------------------
57 #----------------------------------------------------------------------------------------------------
59 ADPCM
= source
/adpcmlib
/adpcm.o
62 GFX
= source
/gfxlib
/2xSaI.o \
63 source
/gfxlib
/bilinear.o \
64 source
/gfxlib
/dotmatrix.o \
66 source
/gfxlib
/hq2x.o \
67 source
/gfxlib
/motionblur.o \
68 source
/gfxlib
/scale2x.o \
69 source
/gfxlib
/scanline.o \
70 source
/gfxlib
/simple2x.o \
74 GAME
= source
/gamelib
/draw.o \
75 source
/gamelib
/draw16.o \
76 source
/gamelib
/draw32.o \
77 source
/gamelib
/font.o \
78 source
/gamelib
/anigif.o \
79 source
/gamelib
/bitmap.o \
80 source
/gamelib
/screen.o \
81 source
/gamelib
/screen16.o \
82 source
/gamelib
/screen32.o \
83 source
/gamelib
/loadimg.o \
84 source
/gamelib
/palette.o \
85 source
/gamelib
/packfile.o \
86 source
/gamelib
/filecache.o \
87 source
/gamelib
/pixelformat.o \
88 source
/gamelib
/soundmix.o \
89 source
/gamelib
/spritef.o \
90 source
/gamelib
/spriteq.o \
91 source
/gamelib
/spritex8p16.o \
92 source
/gamelib
/spritex8p32.o \
93 source
/gamelib
/texture.o \
94 source
/gamelib
/texture16.o \
95 source
/gamelib
/commands.o \
96 source
/gamelib
/models.o \
97 source
/gamelib
/texture32.o source
/gamelib
/movie.o source
/gamelib
/menus.o
98 SCRIPT
= source
/scriptlib
/StackedSymbolTable.o \
99 source
/scriptlib
/ScriptVariant.o \
100 source
/scriptlib
/SymbolTable.o \
101 source
/scriptlib
/Instruction.o \
102 source
/scriptlib
/Interpreter.o \
103 source
/scriptlib
/ImportCache.o \
104 source
/scriptlib
/ParserSet.o \
105 source
/scriptlib
/Parser.o \
106 source
/scriptlib
/Lexer.o \
107 source
/scriptlib
/Stack.o \
108 source
/scriptlib
/List.o \
109 source
/scriptlib
/SolidList.o \
110 source
/preprocessorlib
/pp_lexer.o \
111 source
/preprocessorlib
/pp_parser.o
112 RAND
= source
/randlib
/rand32.o
113 PNG
= source
/pnglib
/pngdec.o source
/pnglib
/savepng.o
114 SOURCE
= source
/stringptr.o \
120 GAME
+= source
/gamelib
/filters.o
126 GAME_CONSOLE
+= sdl
/joysticks.o \
137 GAME_CONSOLE
+= sdl
/opengl.o
142 GAME_CONSOLE
+= sdl
/loadgl.o
145 MAIN
= openbor.o data.o openborscript.o
147 OBJS
= $(MAIN
) $(GAME_CONSOLE
) $(ADPCM
) $(GFX
) $(GAME
) $(SOURCE
) $(SCRIPT
) $(RAND
) $(PNG
)
150 #----------------------------------------------------------------------------------------------------
152 #----------------------------------------------------------------------------------------------------
154 CFLAGS
+= $(addprefix -I
", $(addsuffix ", $(INCS
))) $(ARCHFLAGS
)
155 CFLAGS
+= -Wall
-fsigned-char
158 CFLAGS
+= -fno-ident
-freorder-blocks
160 CFLAGS
+= -DDEBUG
-O0
-g
161 ifdef NO_RAM_DEBUGGER
162 CFLAGS
+= -DNO_RAM_DEBUGGER
171 CFLAGS
+= -DOV_EXCLUDE_STATIC_CALLBACKS
200 CXXFLAGS
= $(CFLAGS
) -fno-exceptions
-fno-rtti
203 #----------------------------------------------------------------------------------------------------
205 #----------------------------------------------------------------------------------------------------
207 LIBS
= $(addprefix -L
", $(addsuffix ", $(LIBRARIES
)))
211 LIBS
+= -lSDL
-lSDL_gfx
224 LIBS
+= -lvorbisfile
-lvorbis
-logg
232 LIBS
+= -lpng
-lz
-lm
235 #----------------------------------------------------------------------------------------------------
236 # Rules to manage Files and Libraries for SDL
237 #----------------------------------------------------------------------------------------------------
239 all : $(TARGET
) $(TARGET_FINAL
)
242 @echo Compiling
$(TARGET_PLATFORM
) Port
: $<...
243 @
$(YASM
) -D
$(TARGET_PLATFORM
) -f
$(OBJTYPE
) -m
$(TARGET_ARCH
) -o
$@
$<
245 @echo Compiling
$(TARGET_PLATFORM
) Port
: $<...
246 @echo
$(CC
) $(CFLAGS
) -c
$< -o
$@
247 @
$(CC
) $(CFLAGS
) -c
$< -o
$@
248 $(TARGET
) : $(OBJS
) $(RES
)
250 @echo Linking
$(TARGET_PLATFORM
) Port
: $(TARGET
)...
251 @echo
$(CC
) $(CFLAGS
) -o
$(TARGET
) $(OBJS
) $(TARGET_RESOURCE
) $(LIBS
)
252 @
$(CC
) $(CFLAGS
) -o
$(TARGET
) $(OBJS
) $(TARGET_RESOURCE
) $(LIBS
)
253 @echo Completed
$(TARGET_PLATFORM
) Port
!
254 @echo
$(TARGET
) is now ready
!
256 #call make switch_gen to re-generate the stringswitch files
258 $(STRINGSWITCH_GEN
) openbor.c
260 clean-all
: clean-releases
clean
267 @echo
"Removing All $(TARGET_PLATFORM) Files..."
268 @
rm -f
$(TARGET
) $(TARGET_MAP
) PARAM.SFO linkmap
$(OBJS
)
273 @echo
"-------------------------------------------------------"
274 @echo
"OpenBOR $(VERSION) - http://www.LavaLit.com"
276 @echo
"Licensed under the BSD license."
277 @echo
"See LICENSE and README within OpenBOR root for details."
279 @echo
"Copyright (c) 2004 - 2011 OpenBOR Team"
280 @echo
"-------------------------------------------------------"