summaryrefslogtreecommitdiff
path: root/makefile.macosx
blob: 165b39c98d9045ab57dd31d95fe9dc8c6223006a (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
CXX = g++
# for debugging
#CXXFLAGS = -g -march=i686 -O2

# excessive optimizations for pentium pro and later
CXXFLAGS =-Wall -O3 -fexpensive-optimizations -pipe -fomit-frame-pointer -funroll-loops -DMACOSX -fexceptions

CFLAGS=`allegro-config --libs release` -lalfont /usr/lib/libjgmod.a

OBJS =  src/sound/sound.o src/graphic/super_eagle.o src/graphic/graphic.o
OBJS += src/gui/chat.o src/gui/skill.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 src/net/win2mac.o
OBJS += src/being.o src/game.o src/main.o src/map.o src/log.o src/astar.o

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

tmw-app: $(OBJS)
	$(CXX) -o tmw-app $(OBJS) $(CFLAGS) -DMACOSX_APP

app: tmw-app
	rm -rf tmw.app
	mkdir tmw.app
	mkdir tmw.app/Contents
	mkdir tmw.app/Contents/Resources
	mkdir tmw.app/Contents/MacOS
	cp tmw-app tmw.app/Contents/MacOS/
	cp *.dat tmw.app/Contents/Resources/
	cp -R Sound tmw.app/Contents/Resources/
	cp -R items tmw.app/Contents/Resources/
	cp -R Graphic tmw.app/Contents/Resources/
	cp -R Aqua tmw.app/Contents/Resources/
	cp -R Maps	tmw.app/Contents/Resources/
	cp aqua.skin	tmw.app/Contents/Resources/
	cp tmw.ini	tmw.app/Contents/Resources/
	mv tmw.app tmw.app2
	mv tmw.app2 tmw.app

clean:
	- rm -fv *.o
	- rm -fv Net/*.o
	- rm -fv Gui/*.o
	- rm -fv Sound/*.o
	- rm -fv Graphic/*.o
	- rm -fv tmw 
	- rm -rf tmw.app