forked from miki151/keeperrl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile-win
70 lines (46 loc) · 2.08 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
CC = g++
LD = g++
CFLAGS = -Wall -std=c++0x -Wno-sign-compare -Wno-unused-variable
ifdef DATA_DIR
CFLAGS += -DDATA_DIR=\"$(DATA_DIR)\"
endif
ifndef OPTFLAGS
OPTFLAGS = -Winvalid-pch -static-libstdc++ -static -DSFML_STATIC -DWINDOWS -DRELEASE -O3
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 message_buffer.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 quest.cpp shortest_path.cpp effect.cpp equipment.cpp level_maker.cpp monster_ai.cpp attack.cpp attack.cpp tribe.cpp name_generator.cpp event.cpp location.cpp skill.cpp fire.cpp ranged_weapon.cpp action.cpp map_layout.cpp trigger.cpp map_memory.cpp view_index.cpp pantheon.cpp enemy_check.cpp collective.cpp collective_action.cpp task.cpp markov_chain.cpp controller.cpp village_control.cpp poison_gas.cpp minion_equipment.cpp statistics.cpp options.cpp
LIBS = -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound -lpsapi -lgdiplus -lshlwapi -luuid -lfreetype-2.4.8-static-md -lopengl32 -lglu32
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: $(OBJDIR) $(NAME)
$(OBJDIR):
mkdir $(OBJDIR)
stdafx.h.gch: stdafx.h $(wildcard *.h)
$(CC) -MMD $(CFLAGS) -c $< -o $@
$(OBJDIR)/%.o: %.cpp stdafx.h.gch
$(CC) -MMD $(CFLAGS) -c $< -o $@
$(NAME): $(OBJS) $(OBJDIR)/main.o
$(LD) $(CFLAGS) -o $@ $^ $(LIBS)
test: $(OBJS) $(OBJDIR)/test.o
$(LD) $(CFLAGS) -o $@ $^ $(LIBS)
monkey: $(OBJS) $(OBJDIR)/monkey_test.o
$(LD) $(CFLAGS) -o $@ $^ $(LIBS)
clean:
$(RM) $(OBJDIR)/*.o
$(RM) $(OBJDIR)/*.d
$(RM) $(NAME)
$(RM) stdafx.h.gch
-include $(DEPS)