From a3343d0d7c2734efec19de6be934565b5967fc64 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 10 Dec 2004 21:32:35 +0000 Subject: Changed makefile a bit to have it create the object files in a separate directory. --- file.list | 26 +++++++++++++++++++++----- makefile.linuxppc | 19 ++++++++++++------- makefile.macosx | 18 +++++++++++------- obj/graphic/placeholder.txt | 1 + obj/gui/placeholder.txt | 1 + obj/net/placeholder.txt | 1 + obj/sound/placeholder.txt | 1 + 7 files changed, 48 insertions(+), 19 deletions(-) create mode 100644 obj/graphic/placeholder.txt create mode 100644 obj/gui/placeholder.txt create mode 100644 obj/net/placeholder.txt create mode 100644 obj/sound/placeholder.txt diff --git a/file.list b/file.list index 28615330..d3f1e749 100644 --- a/file.list +++ b/file.list @@ -1,5 +1,21 @@ -OBJS = src/sound/sound.o src/graphic/2xsai.o src/graphic/graphic.o -OBJS += src/gui/chat.o src/gui/skill.o src/gui/shop.o src/gui/stats.o src/gui/npc.o src/gui/setup.o -OBJS += src/gui/gui.o src/gui/login.o src/gui/char_server.o src/gui/char_select.o src/gui/inventory.o -OBJS += src/net/network.o src/net/protocol.o -OBJS += src/being.o src/game.o src/main.o src/map.o src/log.o src/astar.o \ No newline at end of file +MODULES = src/sound/sound.cpp \ + src/graphic/2xsai.cpp \ + src/graphic/graphic.cpp \ + src/gui/chat.cpp \ + src/gui/skill.cpp \ + src/gui/shop.cpp \ + src/gui/stats.cpp \ + src/gui/npc.cpp \ + src/gui/setup.cpp \ + src/gui/gui.cpp \ + src/gui/login.cpp \ + src/gui/char_server.cpp \ + src/gui/char_select.cpp \ + src/gui/inventory.cpp \ + src/net/network.cpp \ + src/net/protocol.cpp \ + src/being.cpp src/game.cpp \ + src/main.cpp \ + src/map.cpp \ + src/log.cpp \ + src/astar.cpp diff --git a/makefile.linuxppc b/makefile.linuxppc index f2a2bd9b..dd119a91 100644 --- a/makefile.linuxppc +++ b/makefile.linuxppc @@ -8,7 +8,9 @@ CXXFLAGS =-Wall -O3 -fexpensive-optimizations -pipe -fomit-frame-pointer -funrol CFLAGS=-ljgmod `allegro-config --libs release` -lalfont include file.list -OBJS +=src/net/win2mac.o +MODULES += src/net/win2mac.cpp + +OBJS := $(patsubst src%, obj%, $(patsubst %.cpp, %.o, $(MODULES))) tmw: $(OBJS) $(CXX) -o tmw $(OBJS) $(CFLAGS) @@ -17,9 +19,12 @@ tmw: $(OBJS) @echo "TYPE ./tmw TO LAUCH THE GAME" clean: - - rm -fv *.o - - rm -fv Net/*.o - - rm -fv Gui/*.o - - rm -fv Sound/*.o - - rm -fv Graphic/*.o - - rm -fv tmw + - rm -fv obj/*.o + - rm -fv obj/net/*.o + - rm -fv obj/gui/*.o + - rm -fv obj/sound/*.o + - rm -fv obj/graphic/*.o + - rm -fv tmw + +obj/%.o: src/%.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ diff --git a/makefile.macosx b/makefile.macosx index e450705c..3df4f681 100644 --- a/makefile.macosx +++ b/makefile.macosx @@ -8,7 +8,9 @@ CXXFLAGS =-Wall -O3 -fexpensive-optimizations -pipe -fomit-frame-pointer -funrol CFLAGS=`allegro-config --libs release` -lalfont /usr/lib/libjgmod.a include file.list -OBJS +=src/net/win2mac.o +MODULES += src/net/win2mac.cpp + +OBJS := $(patsubst src%, obj%, $(patsubst %.cpp, %.o, $(MODULES))) tmw: $(OBJS) $(CXX) -o tmw $(OBJS) $(CFLAGS) @@ -17,10 +19,12 @@ tmw: $(OBJS) @echo "TYPE ./tmw TO LAUCH THE GAME" clean: - - rm -fv src/*.o - - rm -fv src/Net/*.o - - rm -fv src/Gui/*.o - - rm -fv src/Sound/*.o - - rm -fv src/Graphic/*.o - - rm -fv tmw + - rm -fv obj/*.o + - rm -fv obj/net/*.o + - rm -fv obj/gui/*.o + - rm -fv obj/sound/*.o + - rm -fv obj/graphic/*.o + - rm -fv tmw +obj/%.o: src/%.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ diff --git a/obj/graphic/placeholder.txt b/obj/graphic/placeholder.txt new file mode 100644 index 00000000..b951fc55 --- /dev/null +++ b/obj/graphic/placeholder.txt @@ -0,0 +1 @@ +This file is here to make sure the otherwise empty directory is created. diff --git a/obj/gui/placeholder.txt b/obj/gui/placeholder.txt new file mode 100644 index 00000000..b951fc55 --- /dev/null +++ b/obj/gui/placeholder.txt @@ -0,0 +1 @@ +This file is here to make sure the otherwise empty directory is created. diff --git a/obj/net/placeholder.txt b/obj/net/placeholder.txt new file mode 100644 index 00000000..b951fc55 --- /dev/null +++ b/obj/net/placeholder.txt @@ -0,0 +1 @@ +This file is here to make sure the otherwise empty directory is created. diff --git a/obj/sound/placeholder.txt b/obj/sound/placeholder.txt new file mode 100644 index 00000000..b951fc55 --- /dev/null +++ b/obj/sound/placeholder.txt @@ -0,0 +1 @@ +This file is here to make sure the otherwise empty directory is created. -- cgit v1.2.3-70-g09d2