-
Notifications
You must be signed in to change notification settings - Fork 104
/
Makedefs
97 lines (88 loc) · 3.39 KB
/
Makedefs
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
95
96
97
#CC = i586-mingw32msvc-gcc
#CXX = i586-mingw32msvc-g++
#LD = i586-mingw32msvc-g++
#AR = i586-mingw32msvc-ar
#WINDRES = i586-mingw32msvc-windres
LD = $(CXX)
ifneq ($(DEBUG),1)
CFLAGS += -Wall -Wextra -Werror -O3
CXXFLAGS += -Wall -Wextra -Werror -O3
else
ifneq ($(OS),Windows_NT)
CFLAGS += -Wall -Wextra -Werror -O0 -g -fsanitize=address -fno-omit-frame-pointer
CXXFLAGS += -Wall -Wextra -Werror -O0 -g -fsanitize=address -fno-omit-frame-pointer
LDFLAGS += -fsanitize=address
else
CFLAGS += -Wall -Wextra -Werror -O0 -g -fno-omit-frame-pointer
CXXFLAGS += -Wall -Wextra -Werror -O0 -g -fno-omit-frame-pointer
endif
endif
ifeq ($(PROFILE),1)
CFLAGS += -pg
CXXFLAGS += -pg
LDFLAGS += -pg
endif
ifeq ($(OS),Windows_NT)
CPPFLAGS += -D__USE_MINGW_ANSI_STDIO=0
endif
CPPFLAGS += -I../shared
GIMXFILE_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxfile
GIMXCONFIGEDITOR_LDFLAGS = -L../shared/gimxconfigeditor \
$(GIMXINPUT_LDFLAGS) \
$(GIMXTIMER_LDFLAGS) \
$(GIMXPOLL_LDFLAGS) \
$(GIMXCONTROLLER_LDFLAGS)
GIMXCONFIGUPDATER_LDFLAGS = -L../shared/gimxfile -L../shared/gimxdownloader -L../shared/gimxconfigupdater
GIMXCONTROLLER_LDFLAGS = -L../shared/gimxcontroller
GIMXLOG_LDFLAGS = -L../shared/gimxlog
GIMXTIME_LDFLAGS = -L../shared/gimxtime
GIMXHID_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxhid
GIMXINPUT_LDFLAGS = $(GIMXTIME_LDFLAGS) $(GIMXHID_LDFLAGS) -L../shared/gimxinput
GIMXPOLL_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxpoll
GIMXPRIO_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxprio
GIMXSERIAL_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxserial
GIMXTIMER_LDFLAGS = $(GIMXLOG_LDFLAGS) $(GIMXTIME_LDFLAGS) -L../shared/gimxtimer
GIMXUHID_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxuhid
GIMXUSB_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxusb
GIMXGPP_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxgpp
GIMXUPDATER_LDFLAGS = -L../shared/gimxfile -L../shared/gimxdownloader -L../shared/gimxupdater
GIMXUDP_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxudp
GIMXFILE_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxfile
GIMXCONFIGEDITOR_LDLIBS = -lgimxconfigeditor \
$(GIMXINPUT_LDLIBS) \
$(GIMXTIMER_LDLIBS) \
$(GIMXPOLL_LDLIBS) \
$(GIMXCONTROLLER_LDLIBS)
GIMXCONFIGUPDATER_LDLIBS = -lgimxfile -lgimxdownloader -lgimxconfigupdater
GIMXCONTROLLER_LDLIBS = -lgimxcontroller
GIMXLOG_LDLIBS = -lgimxlog
GIMXTIME_LDLIBS = -lgimxtime
GIMXHID_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxhid
GIMXINPUT_LDLIBS = $(GIMXTIME_LDLIBS) $(GIMXHID_LDLIBS) -lgimxinput
GIMXPOLL_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxpoll
GIMXPRIO_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxprio
GIMXSERIAL_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxserial
GIMXTIMER_LDLIBS = $(GIMXLOG_LDLIBS) $(GIMXTIME_LDLIBS) -lgimxtimer
GIMXUHID_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxuhid
GIMXUSB_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxusb
GIMXGPP_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxgpp
GIMXUPDATER_LDLIBS = -lgimxfile -lgimxdownloader -lgimxupdater
GIMXUDP_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxudp
ifeq ($(OS),Windows_NT)
GIMXINPUT_CPPFLAGS += `sdl2-config --cflags`
GIMXUSB_LDFLAGS += $(GIMXTIMER_LDFLAGS)
GIMXUSB_LDLIBS += $(GIMXTIMER_LDLIBS)
else
UHID=1
ifeq ($(UHID),1)
CFLAGS += -DUHID
GIMXINPUT_LDFLAGS += $(GIMXUHID_LDFLAGS)
GIMXINPUT_LDLIBS += $(GIMXUHID_LDLIBS)
endif
endif
ARFLAGS=rcs
ifneq ($(OS),Windows_NT)
SHLIB_SUFFIX=.so
else
SHLIB_SUFFIX=.dll
endif