source: network-game/client/makefile@ ace001a

Last change on this file since ace001a was e708305, checked in by Dmitry Portnoy <dmp1488@…>, 10 years ago

Client makefile works on both linux and mac

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[3f5616f]1CC = g++
[8df0c49]2FLAGS = -Wall -g
[e708305]3
4UNAME_S := $(shell uname -s)
5
6LIB_FLAGS = `pkg-config --cflags --libs --static allegro-static-5.0 allegro_main-static-5.0 allegro_ttf-static-5.0 allegro_primitives-static-5.0`
7
8# osx needs to link against some extra libraries
9ifeq ($(UNAME_S),Darwin)
10 LIB_FLAGS += -framework AppKit -framework IOKit -framework OpenGL -framework AGL -framework OpenAL
11endif
12
[3f5616f]13COMMON_PATH = ../common
[8aed9c0]14DEPENDENCIES = Common.o MessageContainer.o MessageProcessor.o Player.o WorldMap.o Projectile.o Game.o GameRender.o GameSummary.o chat.o GuiComponent.o Window.o Textbox.o Button.o RadioButtonList.o TextLabel.o
[3f5616f]15
16gameClient : Client/main.cpp $(DEPENDENCIES)
[1e250bf]17 $(CC) -o $@ $+ $(FLAGS) $(LIB_FLAGS)
18
19%.o : Client/%.cpp
20 $(CC) -c -o $@ $? $(FLAGS)
[3f5616f]21
[11402be]22Common.o : $(COMMON_PATH)/Common.cpp
23 $(CC) -c -o $@ $? $(FLAGS)
24
[50643fa]25MessageContainer.o : $(COMMON_PATH)/MessageContainer.cpp
26 $(CC) -c -o $@ $? $(FLAGS)
27
[eab83af]28MessageProcessor.o : $(COMMON_PATH)/MessageProcessor.cpp
[3f5616f]29 $(CC) -c -o $@ $? $(FLAGS)
30
[edfd1d0]31Player.o : $(COMMON_PATH)/Player.cpp
32 $(CC) -c -o $@ $? $(FLAGS)
33
[eab83af]34WorldMap.o : $(COMMON_PATH)/WorldMap.cpp
35 $(CC) -c -o $@ $? $(FLAGS)
36
37Projectile.o : $(COMMON_PATH)/Projectile.cpp
38 $(CC) -c -o $@ $? $(FLAGS)
39
[50643fa]40Game.o : $(COMMON_PATH)/Game.cpp
41 $(CC) -c -o $@ $? $(FLAGS)
42
[8aed9c0]43GameSummary.o : $(COMMON_PATH)/GameSummary.cpp
44 $(CC) -c -o $@ $? $(FLAGS)
45
[3f5616f]46clean:
[0b6f9ec]47 rm -f *.o
48 rm -f gameClient
Note: See TracBrowser for help on using the repository browser.