summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorpixel <pixel>2008-07-04 12:03:00 +0000
committerpixel <pixel>2008-07-04 12:03:00 +0000
commit694d522362c2d7b8aac83e5b4b57c964f751204c (patch)
treea5a93d6b492563b6ec7db1209d5879734127208c /Makefile
Adding project files.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile174
1 files changed, 174 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e6c1aaf
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,174 @@
+CC = gcc
+CXX = g++
+LD = g++
+STRIP = strip
+
+INCLUDES = \
+-I../mogltk/include \
+-I../Baltisot/include \
+-I../Baltisot/lib/zlib/include \
+-I../Baltisot/lib/lua/include -I../Baltisot/lib/lua/includes \
+-I../lua-modules/src \
+
+HAVES = -DHAVE_VSSCANF -DHAVE_LIBJPEG -DHAVE_FCNTL -DHAVE_MYSQL -DHAVE_UNISTD_H -DHAVE_FORK -DHAVE_PIPE -DHAVE_FSYNC -DHAVE_MALLOC_H -DHAVE_ASPRINTF -DHAVE_BYTESWAP_H
+
+CPPFLAGS += $(INCLUDES) -g -DSTDC_HEADERS -DREADLINE_STATIC -DHOOK_STDS -fexceptions -DWORDS_LITTLEENDIAN -fexceptions -march=i686 $(HAVES) -DUSE_MPQLIB
+
+LDFLAGS += -u gluNewTess -rdynamic -g -fexception -lpthread -ljpeg -lSegFault ../Mesa-7.0.2/lib/libGLU.a ../Mesa-7.0.2/lib/libOSMesa.a /usr/lib/libreadline.a /usr/lib/libncurses.a -lz -ldl
+
+vpath %.c ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:../paperIdol/src:../mogltk/lib:../tinyxml:../lua-modules/src
+vpath %.cc ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:../paperIdol/src:../mogltk/lib:../tinyxml:../lua-modules/src
+vpath %.cpp ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:../paperIdol/src:../mogltk/lib:../tinyxml:../lua-modules/src
+vpath %.lua ../Baltisot/lib:../Baltisot/src
+
+LUAINTERFACE_SOURCES = \
+lua-interface.cc \
+lua-plugin.cc \
+
+BALTISOT_SOURCES = \
+Main.cc \
+\
+Exceptions.cc \
+String.cc \
+Regex.cc \
+\
+Base64.cc \
+\
+Handle.cc \
+Input.cc \
+InPipe.cc \
+Output.cc \
+Buffer.cc \
+\
+ConfigFile.cc \
+\
+Socket.cc \
+\
+Task.cc \
+TaskMan.cc \
+ChainTasks.cc \
+CopyJob.cc \
+ReadJob.cc \
+HttpServ.cc \
+Action.cc \
+Domain.cc \
+HtmlSkinner.cc \
+Variables.cc \
+Message.cc \
+Form.cc \
+SocketClient.cc \
+HttpClient.cc \
+MailClient.cc \
+HashFunction.cc \
+\
+BLua.cc \
+LuaTask.cc \
+LuaHandle.cc \
+LuaCommandLine.cc \
+\
+fileutils.cc \
+generic.cc \
+checkargs.c \
+datecalc.c \
+\
+hashtab.c \
+recycle.c \
+lookupa.c \
+\
+md5.c \
+sha1.c \
+sha256.c \
+
+LUA_SOURCES = \
+lapi.c \
+lcode.c \
+ldebug.c \
+ldo.c \
+ldump.c \
+lfunc.c \
+lgc.c \
+llex.c \
+lmem.c \
+lobject.c \
+lopcodes.c \
+lparser.c \
+lstate.c \
+lstring.c \
+ltable.c \
+ltests.c \
+ltm.c \
+luacomp.c \
+lundump.c \
+lvm.c \
+lzio.c \
+lprint.c \
+\
+linit.c \
+lauxlib.c \
+loadlib.c \
+lbaselib.c \
+ldblib.c \
+ldirlib.c \
+liolib.c \
+loslib.c \
+lmathlib.c \
+lstrlib.c \
+ltablib.c \
+
+LUAC_SOURCES = \
+luac.cc \
+\
+Main.cc \
+Exceptions.cc \
+String.cc \
+\
+Handle.cc \
+Input.cc \
+Output.cc \
+Buffer.cc \
+\
+BLua.cc \
+\
+fileutils.cc \
+generic.cc \
+checkargs.c \
+datecalc.c \
+
+
+WHOLE_SOURCES = $(BALTISOT_SOURCES) $(LUA_SOURCES) $(LUAINTERFACE_SOURCES)
+
+LUAINTERFACE_OBJECTS = $(addsuffix .o, $(notdir $(basename $(LUAINTERFACE_SOURCES))))
+LUAC_OBJECTS = $(addsuffix .o, $(notdir $(basename $(LUAC_SOURCES) $(LUA_SOURCES))))
+
+ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(WHOLE_SOURCES))))
+ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(WHOLE_SOURCES))))
+
+all: dep luac lua-interface
+
+dep: $(ALL_DEPS)
+
+luac: $(LUAC_OBJECTS)
+ $(LD) -o luac $(LUAC_OBJECTS) $(LDFLAGS)
+
+lua-interface: $(ALL_OBJECTS)
+ $(LD) -o lua-interface $(ALL_OBJECTS) $(LDFLAGS)
+
+clean:
+ rm -f lua-interface luac *.o *.dep
+
+%.dep : %.c
+ $(CC) $(CPPFLAGS) -M -MF $@ $<
+
+%.dep : %.cpp
+ $(CXX) $(CPPFLAGS) -M -MF $@ $<
+
+%.dep : %.cc
+ $(CXX) $(CPPFLAGS) -M -MF $@ $<
+
+%.c : %.clua
+ bin2c $< $@ $(basename $@)
+
+%.clua : %.lua
+ ./luac -o $@ $<
+
+-include $(ALL_DEPS)