forked from miki151/keeperrl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile-win
94 lines (66 loc) · 3.64 KB
/
Makefile-win
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
CC = g++
LD = g++
CFLAGS = -Wall -std=c++11 -Wno-sign-compare -Wno-unused-variable -Wl,--stack,16000000
ifdef DATA_DIR
CFLAGS += -DDATA_DIR=\"$(DATA_DIR)\"
endif
ifdef DEBUG
GFLAG += -g
endif
ifdef NO_OMIT_FP
GFLAG += -fno-inline -fno-omit-frame-pointer
endif
ifdef PROF
GFLAG += -pg
endif
ifdef RELEASE
GFLAG += -DRELEASE
endif
ifdef AMD64
GFLAG += -DAMD64
endif
ifdef OPT
GFLAG += -O2
endif
ifndef OPTFLAGS
OPTFLAGS = -Winvalid-pch -DWINDOWS $(GFLAG)
endif
OBJDIR = obj
NAME = keeper
ROOT = ./
TOROOT = ./../
IPATH = -I. -I./extern
CFLAGS += $(IPATH)
SRCS = time_queue.cpp level.cpp model.cpp square.cpp util.cpp monster.cpp square_factory.cpp view.cpp creature.cpp item_factory.cpp item.cpp inventory.cpp debug.cpp player.cpp window_view.cpp field_of_view.cpp view_object.cpp creature_factory.cpp shortest_path.cpp effect.cpp equipment.cpp level_maker.cpp monster_ai.cpp attack.cpp tribe.cpp name_generator.cpp event.cpp location.cpp skill.cpp fire.cpp ranged_weapon.cpp map_layout.cpp trigger.cpp map_memory.cpp view_index.cpp pantheon.cpp collective.cpp task.cpp controller.cpp village_control.cpp poison_gas.cpp minion_equipment.cpp statistics.cpp options.cpp renderer.cpp tile.cpp map_gui.cpp gui_elem.cpp item_attributes.cpp creature_attributes.cpp serialization.cpp unique_entity.cpp entity_set.cpp gender.cpp main.cpp gzstream.cpp singleton.cpp technology.cpp encyclopedia.cpp input_queue.cpp minimap_gui.cpp music.cpp test.cpp sectors.cpp vision.cpp animation.cpp clock.cpp square_type.cpp creature_action.cpp player_control.cpp collective_control.cpp renderable.cpp bucket_map.cpp task_map.cpp movement_type.cpp collective_builder.cpp player_message.cpp minion_task_map.cpp gui_builder.cpp known_tiles.cpp collective_teams.cpp progress_meter.cpp entity_name.cpp collective_config.cpp spell.cpp spell_map.cpp spectator.cpp visibility_map.cpp model_builder.cpp file_sharing.cpp stack_printer.cpp highscores.cpp main_loop.cpp construction_map.cpp level_builder.cpp move_info.cpp movement_set.cpp position.cpp stair_key.cpp position_map.cpp collective_attack.cpp territory.cpp drag_and_drop.cpp
ifdef AMD64
LIBS = -lsfml-graphics -lsfml-audio -lsfml-window -lsfml-system -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound -lpsapi -lgdiplus -lshlwapi -luuid -lfreetype -lfreeglut -lglu32 -lz -lboost_serialization-mgw49-mt-1_57 -lboost_program_options-mgw49-mt-1_57 -lboost_system-mgw49-mt-1_57 -lboost_filesystem-mgw49-mt-1_57 -lglew32 -ljpeg -lopenal32 -lsndfile -lopengl32 -lcurldll -limagehlp
else
LIBS = -lsfml-graphics -lsfml-audio -lsfml-window -lsfml-system -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound -lpsapi -lgdiplus -lshlwapi -luuid -lfreetype -lglut -lglu32 -lz -lboost_serialization-mgw49-mt-1_56 -lboost_program_options-mgw49-mt-1_56 -lboost_system-mgw49-mt-1_56 -lboost_filesystem-mgw49-mt-1_56 -lglew -ljpeg -lopenal32 -lsndfile -lopengl32 -lcurldll -limagehlp
endif
ifdef debug
CFLAGS += -g
OBJDIR := ${addsuffix -d,$(OBJDIR)}
NAME := ${addsuffix -d,$(NAME)}
else
CFLAGS += $(OPTFLAGS)
endif
OBJS = $(addprefix $(OBJDIR)/,$(SRCS:.cpp=.o))
DEPS = $(addprefix $(OBJDIR)/,$(SRCS:.cpp=.d))
##############################################################################
all: gen_version $(NAME)
stdafx.h.gch: stdafx.h $(wildcard *.h)
$(CC) -MMD $(CFLAGS) -c $< -o $@
$(OBJDIR)/%.o: %.cpp
$(CC) -MMD $(CFLAGS) -c $< -o $@
$(NAME): $(OBJS) $(OBJDIR)/main.o
$(LD) $(CFLAGS) -o $@ $^ $(LIBS)
test: $(OBJS) $(OBJDIR)/test.o
$(LD) $(CFLAGS) -o $@ $^ $(LIBS)
gen_version:
bash ./gen_version.sh
clean:
$(RM) $(OBJDIR)/*.o
$(RM) $(OBJDIR)/*.d
$(RM) $(NAME)
$(RM) stdafx.h.gch
-include $(DEPS)