This repository has been archived by the owner on Aug 10, 2019. It is now read-only.
forked from AdVetter/XXLDDRace
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.win64
58 lines (39 loc) · 1.54 KB
/
Makefile.win64
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
ARCH ?= 64
CPPFLAGS := -m$(ARCH) -flto -O3 -pipe -fno-exceptions -fvisibility=internal \
-Wall -DCONF_RELEASE -DNO_VIZ -I "src" -I "other/mysql/include" -I "src/engine/external/zlib" -I "other/sdl/include" -I "other/freetype/include"
CXXFLAGS := -std=c++11 -fno-rtti
CFLAGS :=
LDFLAGS := -m$(ARCH) -flto -O3 -s -static-libgcc -static-libstdc++
ifeq ($(ARCH),64)
CPPFLAGS += -mavx -mfpmath=both
endif
CC := gcc
CXX := g++
LD := $(CXX)
PYTHON ?= python
WINDRES ?= windres
all: XXLDDRace.exe XXLDDRace-Server.exe versionsrv.exe mastersrv.exe banmaster.exe
include common.mk
generated := $(generated_h) $(generated_cpp) other/icons/teeworlds_srv_gcc.coff other/icons/teeworlds_gcc.coff
.PHONY: all clean distclean
clean:
-rm $(sort $(all_objs) XXLDDRace.exe XXLDDRace-Server.exe)
distclean: clean
-rm $(generated)
-rm -rf objs/
# rules for target files
XXLDDRace.exe: $(client_objs) other/icons/teeworlds_gcc.coff
$(LD) $(LDFLAGS) -o '$@' $^ -Lother/sdl/lib$(ARCH) -Lother/freetype/lib$(ARCH) -lws2_32 -lgdi32 -lopengl32 -lglu32 -lfreetype -lSDL -lSDLmain
XXLDDRace-Server.exe: $(server_objs) other/icons/teeworlds_srv_gcc.coff
$(LD) $(LDFLAGS) -o '$@' $^ -lws2_32
#versionsrv.exe: $(versionsrv_objs)
# $(LD) $(LDFLAGS) -o '$@' $^ -lws2_32
#mastersrv.exe: $(mastersrv_objs)
# $(LD) $(LDFLAGS) -o '$@' $^ -lws2_32
#banmaster.exe: $(banmaster_objs)
# $(LD) $(LDFLAGS) -o '$@' $^ -lws2_32
.SECONDEXPANSION:
versionsrv.exe mastersrv.exe banmaster.exe: $$($$(patsubst %.exe,%_objs,$$@))
$(LD) $(LDFLAGS) -o '$@' $^ -lws2_32
%.coff: %.rc
$(WINDRES) -i $< -o $@