-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile.mingw
72 lines (56 loc) · 2.22 KB
/
Makefile.mingw
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
# Makefile for Windows (MinGW)
# Copyleft (C) 2011-2012 Fallen <[email protected]>
CXX = @echo Compiling $< && g++
INCPATH = -I"."
CXXFLAGS = -O2 -Wall -Wno-strict-aliasing -D_THREAD_SAFE -D_REENTRANT -D__ENABLE_SERVER_DIAGNOSTIC__ -D__NO_CRYPTOPP__ -DBOOST_THREAD_USE_LIB ${INCPATH}
LIBS = -llua5.1 -lboost_system -lboost_thread -lboost_regex -lboost_filesystem -leay32 -lxml2 -lws2_32 -lwsock32 -lz -liconv
ifdef USE_MYSQL
MAYBE_MYSQL = databasemysql.cpp
CXXFLAGS += -D__USE_MYSQL__
LIBS += -lmysql
endif
ifdef USE_SQLITE
MAYBE_SQLITE = databasesqlite.cpp
CXXFLAGS += -D__USE_SQLITE__
LIBS += -lsqlite3
endif
ifdef USE_PGSQL
MAYBE_PGSQL = databasepgsql.cpp
endif
ifdef LOGIN_SERVER
MAYBE_LOGIN = gameservers.cpp
endif
ifdef OT_ADMIN
MAYBE_OTADMIN = admin.cpp
endif
SRC = weapons.cpp waitlist.cpp vocation.cpp trashholder.cpp tools.cpp \
tile.cpp thing.cpp textlogger.cpp teleport.cpp talkaction.cpp \
status.cpp spells.cpp spawn.cpp server.cpp scriptmanager.cpp \
scheduler.cpp raids.cpp quests.cpp protocolold.cpp protocollogin.cpp \
protocolhttp.cpp protocolgame.cpp protocol.cpp position.cpp player.cpp \
party.cpp outputmessage.cpp outfit.cpp otserv.cpp npc.cpp \
networkmessage.cpp movement.cpp mounts.cpp monsters.cpp monster.cpp \
map.cpp manager.cpp mailbox.cpp luascript.cpp items.cpp \
itemattributes.cpp item.cpp iomarket.cpp iomapserialize.cpp iomap.cpp \
iologindata.cpp ioguild.cpp ioban.cpp housetile.cpp house.cpp group.cpp \
globalevent.cpp gameservers.cpp game.cpp fileloader.cpp exception.cpp \
dispatcher.cpp depot.cpp databasemanager.cpp database.cpp cylinder.cpp \
creatureevent.cpp creature.cpp container.cpp connection.cpp configmanager.cpp \
condition.cpp combat.cpp chat.cpp beds.cpp baseevents.cpp allocator.cpp admin.cpp \
actions.cpp $(MAYBE_MYSQL) $(MAYBE_SQLITE) $(MAYBE_PGSQL) \
$(MAYBE_LOGIN) $(MAYBE_OTADMIN)
DEL = del
TARGET = theforgottenserver
OBJDIR = obj
OBJ = $(SRC:%.cpp=$(OBJDIR)/%.o)
DELOBJ = $(SRC:%.cpp=$(OBJDIR)\\%.o)
.PHONY: all clean
all: $(TARGET)
$(TARGET): ${OBJDIR} $(OBJ)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ) $(LIBS)
$(OBJDIR)/%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
clean:
-$(DEL) $(DELOBJ) $(TARGET)
${OBJDIR}:
@mkdir -p ${OBJDIR}