summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-10 21:32:35 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-10 21:32:35 +0000
commita3343d0d7c2734efec19de6be934565b5967fc64 (patch)
tree4a6b2bea0a987bb69a9d4327bab03638d77277df
parentfc0a04db938e22d875803431c3b3977d5c61b526 (diff)
downloadmana-client-a3343d0d7c2734efec19de6be934565b5967fc64.tar.gz
mana-client-a3343d0d7c2734efec19de6be934565b5967fc64.tar.bz2
mana-client-a3343d0d7c2734efec19de6be934565b5967fc64.tar.xz
mana-client-a3343d0d7c2734efec19de6be934565b5967fc64.zip
Changed makefile a bit to have it create the object files in a separate directory.
-rw-r--r--file.list26
-rw-r--r--makefile.linuxppc19
-rw-r--r--makefile.macosx18
-rw-r--r--obj/graphic/placeholder.txt1
-rw-r--r--obj/gui/placeholder.txt1
-rw-r--r--obj/net/placeholder.txt1
-rw-r--r--obj/sound/placeholder.txt1
7 files changed, 48 insertions, 19 deletions
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.