summaryrefslogtreecommitdiff
path: root/compile/macosX
diff options
context:
space:
mode:
Diffstat (limited to 'compile/macosX')
-rw-r--r--compile/macosX/Makefile146
1 files changed, 146 insertions, 0 deletions
diff --git a/compile/macosX/Makefile b/compile/macosX/Makefile
new file mode 100644
index 0000000..ac6c5f2
--- /dev/null
+++ b/compile/macosX/Makefile
@@ -0,0 +1,146 @@
+CC = gcc
+CXX = g++
+LD = g++
+STRIP = 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../..
+
+CPPFLAGS = $(INCLUDES) -O4 -DSTDC_HEADERS -DREADLINE_STATIC -DHAVE_UNISTD_H -fexceptions `sdl-config --cflags`
+
+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
+vpath %.cc ../../Dalos:../../:../../mogltk/lib:../../generic/lib:../../lib:../../psxdev:../../generic/lib/zlib/src:../../generic/lib/lua/src:../../generic/lib/lua/src/LuaLib
+vpath %.cpp ../../Dalos:../../:../../mogltk/lib:../../generic/lib:../../lib:../../psxdev:../../generic/lib/zlib/src:../../generic/lib/lua/src:../../generic/lib/lua/src/LuaLib
+
+SOURCES = \
+Dalos.cc cd-tool.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
+
+PSXDEV_SOURCES = \
+bs.c jfdctint.c xadecode.c \
+idctfst.c vlc.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))))
+
+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: cd-tool cd-tool-static
+
+stats:
+ @wc $(WHOLE_SOURCES)
+
+dist: all ../../cd-tool.lua ../../FAQ-cd.txt ../../COPYING
+ zip -j9 ../cd-tool-`date +%Y%m%d`-linux-dynamic.zip cd-tool ../../cd-tool.lua ../../FAQ-cd.txt ../../COPYING
+ zip -j9 ../cd-tool-`date +%Y%m%d`-linux-static.zip cd-tool-static ../../cd-tool.lua ../../FAQ-cd.txt ../../COPYING
+ zip -j9 ../Dalos-`date +%Y%m%d`-linux-dynamic.zip Dalos ../../Dalos/Dalos.paq ../../COPYING
+ zip -j9 ../Dalos-`date +%Y%m%d`-linux-static.zip Dalos-static ../../Dalos/Dalos.paq ../../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: $(CD_TOOL_OBJECTS)
+ $(LD) -o cd-tool $(CD_TOOL_OBJECTS) -lreadline -lncurses
+ $(STRIP) cd-tool
+
+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 Dalos Dalos-static cd-tool cd-tool-static *.o
+
+
+
+
+#define OBJECT_C_template
+#$(addsuffix .o, $(notdir $(basename $(1)))): $(src)
+# $$(CC) $$(CPPFLAGS) $$(CFLAGS) -c $(src)
+#endef
+#
+#define OBJECT_CXX_template
+#$(addsuffix .o, $(notdir $(basename $(1)))): $(src)
+# $$(CXX) $$(CPPFLAGS) $$(CXXFLAGS) -c $(src)
+#endef
+#
+#$(foreach src, $(WHOLE_SOURCES), $(if $(filter %.c, $(src)), $(eval $(call OBJECT_C_template, $(src))), $(eval $(call OBJECT_CXX_template, $(src)))))