summaryrefslogtreecommitdiff
path: root/makefile.static
blob: 3bdc109e8a54eca9e913587c13581028411d4351 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CXX = g++
# for debugging
CXXFLAGS += -g -march=i686 -O2 -Wall -D__DEBUG

# excessive optimizations for pentium pro and later
#CXXFLAGS +=-Wall -march=i686 -O3 -fexpensive-optimizations -pipe -fomit-frame-pointer -funroll-loops -fexceptions
CXXFLAGS += `sdl-config --cflags` -fexceptions `pkg-config --cflags libxml-2.0`

LIBS := `sdl-config --libs` -lguichan_sdl -lguichan -lSDL_mixer -lSDL_image \
        `pkg-config --libs libxml-2.0` -lphysfs

include file.list

OBJS := $(patsubst src%, obj%, $(patsubst %.cpp, %.o, $(MODULES)))

tmw: $(OBJS)
	$(CXX) -o tmw $(OBJS) $(LIBS)
	@echo -
	@echo -
	@echo "TYPE ./tmw TO LAUCH THE GAME"

clean:
	- 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 obj/resources/*.o
	- rm -fv tmw

obj/%.o: src/%.cpp
	$(CXX) $(CXXFLAGS) -c $< -o $@