CC = i686-pc-mingw32-gcc CXX = i686-pc-mingw32-g++ LD = i686-pc-mingw32-g++ STRIP = i686-pc-mingw32-strip INCLUDES = \ -I../../includes -I../../psxdev -I../../generic/include \ -I../../generic/lib/zlib/include \ -I../../generic/lib/lua/include -I../../generic/lib/lua/includes \ -I../../mogltk/include \ -I../../MSVC/regex -I../../MSVC/readline -I../../MSVC/getopt -I../../MSVC \ -I../.. CPPFLAGS = $(INCLUDES) -march=i686 -DSTDC_HEADERS -DREADLINE_STATIC -fexceptions LDFLAGS = -O4 `sdl-config --libs` vpath %.c ../../Dalos:../../:../../mogltk/lib:../../generic/lib:../../lib:../../psxdev:../../generic/lib/zlib/src:../../generic/lib/lua/src:../../generic/lib/lua/src/LuaLib:../../MSVC/regex:../../MSVC/getopt vpath %.cc ../../Dalos:../../:../../mogltk/lib:../../generic/lib:../../lib:../../psxdev:../../generic/lib/zlib/src:../../generic/lib/lua/src:../../generic/lib/lua/src/LuaLib:../../MSVC/regex:../../MSVC/getopt vpath %.cpp ../../Dalos:../../:../../mogltk/lib:../../generic/lib:../../lib:../../psxdev:../../generic/lib/zlib/src:../../generic/lib/lua/src:../../generic/lib/lua/src/LuaLib:../../MSVC/regex:../../MSVC/getopt SOURCES = \ cd-tool.cpp #Dalos.cpp MOGLTK_SOURCES = #base.cc glwidgets.cc \ #engine.cc mcolor.cc \ #font.cc shape.cc \ #glbase.cc sprite.cc \ #glfont.cc texture.cc \ #glshape.cc widgets.cc \ #glsprite.cc BALTISOT_SOURCES = \ Image.cc Main.cc \ BLua.cc Buffer.cc \ ConfigFile.cc Output.cc \ Exceptions.cc Regex.cc \ Handle.cc String.cc \ Input.cc fileutils.cc \ LuaHandle.cc generic.cc \ checkargs.c datecalc.c \ LuaRegex.cc LuaConfigFile.cc ZLIB_SOURCES = \ adler32.c inffast.c \ compress.c inflate.c \ crc32.c inftrees.c \ deflate.c \ gzio.c trees.c \ uncompr.c \ zutil.c LUA_SOURCES = \ lapi.c lparser.c \ lcode.c lstate.c \ ldebug.c lstring.c \ ldo.c ltable.c \ ldump.c ltests.c \ lfunc.c ltm.c \ lgc.c luacomp.c \ llex.c lundump.c \ lmem.c lvm.c \ lobject.c lzio.c \ lopcodes.c \ lauxlib.c \ lbaselib.c \ ldblib.c \ liolib.c \ lmathlib.c \ loadlib.c \ lstrlib.c \ ltablib.c \ ldirlib.c #HASH_SOURCES = \ #hashtab.c lookupa.c \ #recycle.c HASH_SOURCES = PSX_SOURCES = \ cdabstract.cpp luacd.cpp \ cdreader.cpp luapsx.cpp \ cdutils.cpp lzss.cpp \ yazedc.cpp isobuilder.cpp \ dvdabstract.cpp PSXDEV_SOURCES = \ bs.c jfdctint.c xadecode.c \ idctfst.c vlc.c REGEX_SOURCES = msvc-regex.c GETOPT_SOURCES = getopt.c getopt1.c COMMON_SOURCES = \ $(BALTISOT_SOURCES) $(ZLIB_SOURCES) $(REGEX_SOURCES) $(GETOPT_SOURCES) \ $(LUA_SOURCES) $(PSX_SOURCES) $(PSXDEV_SOURCES) $(READLINE_SOURCES) \ $(HASH_SOURCES) WHOLE_SOURCES = $(SOURCES) $(COMMON_SOURCES) $(MOGLTK_SOURCES) ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(WHOLE_SOURCES)))) ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(WHOLE_SOURCES)))) DALOS_OBJECTS = $(addsuffix .o, $(notdir $(basename $(COMMON_SOURCES) $(MOGLTK_SOURCES)))) Dalos.o CD_TOOL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(COMMON_SOURCES)))) cd-tool.o all: dep cd-tool.exe dep: $(ALL_DEPS) #stats: # @wc $(WHOLE_SOURCES) dist: all ../../cd-tool.lua ../../COPYING ../../FAQ-cd.txt ../../README-LuaPatch.txt zip -j9 ../cd-tool-`date +%Y%m%d`-win32.zip cd-tool.exe ../../cd-tool.lua ../../FAQ-cd.txt ../../COPYING Dalos: $(DALOS_OBJECTS) $(LD) -o Dalos $(DALOS_OBJECTS) -lGL -lGLU -lreadline -lSDL -lpthread $(STRIP) Dalos Dalos-static: $(DALOS_OBJECTS) $(LD) -o Dalos-static $(DALOS_OBJECTS) -lGL -lGLU -lreadline -lSDL -lpthread -static -laa -lgpm -lncurses -lX11 -lslang -lXext -ldl -lvga -lasound -L/usr/X11R6/lib $(STRIP) Dalos-static cd-tool.exe: $(CD_TOOL_OBJECTS) $(LD) -o cd-tool.exe $(CD_TOOL_OBJECTS) ../../libreadline-static.a -mconsole $(STRIP) cd-tool.exe cd-tool-static: $(CD_TOOL_OBJECTS) $(LD) $(LDFLAGS) -o cd-tool-static $(CD_TOOL_OBJECTS) -lreadline -lncurses -static $(STRIP) cd-tool-static clean: rm -f cd-tool.exe *.o *.dep %.dep : %.c $(CC) $(CPPFLAGS) -M -MF $@ $< %.dep : %.cpp $(CXX) $(CPPFLAGS) -M -MF $@ $< %.dep : %.cc $(CXX) $(CPPFLAGS) -M -MF $@ $< -include $(ALL_DEPS)