Permalink
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (67 sloc) 2.71 KB
#CC = i586-mingw32msvc-gcc
#CXX = i586-mingw32msvc-g++
#LD = i586-mingw32msvc-g++
#AR = i586-mingw32msvc-ar
#WINDRES = i586-mingw32msvc-windres
LD = $(CXX)
CFLAGS += -Wall -Wextra -O3
CXXFLAGS += -Wall -Wextra -O3
#Comment the above two lines and uncomment the below three lines to compile with debug symbols.
#CFLAGS += -Wall -Wextra -O0 -g -fsanitize=address -fno-omit-frame-pointer
#CXXFLAGS += -Wall -Wextra -O0 -g -fsanitize=address -fno-omit-frame-pointer
#LDLIBS += -lasan
CPPFLAGS += -I../shared
GIMXCONFIGEDITOR_LDFLAGS = -L../shared/gimxconfigeditor \
$(GIMXINPUT_LDFLAGS) \
$(GIMXTIMER_LDFLAGS) \
$(GIMXPOLL_LDFLAGS) \
$(GIMXCONTROLLER_LDFLAGS)
GIMXCONFIGUPDATER_LDFLAGS = -L../shared/gimxdownloader -L../shared/gimxconfigupdater
GIMXCONTROLLER_LDFLAGS = -L../shared/gimxcontroller
GIMXLOG_LDFLAGS = -L../shared/gimxlog
GIMXHID_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxhid
GIMXINPUT_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) -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/gimxdownloader -L../shared/gimxupdater
GIMXCONFIGEDITOR_LDLIBS = -lgimxconfigeditor \
$(GIMXINPUT_LDLIBS) \
$(GIMXTIMER_LDLIBS) \
$(GIMXPOLL_LDLIBS) \
$(GIMXCONTROLLER_LDLIBS)
GIMXCONFIGUPDATER_LDLIBS = -lgimxdownloader -lgimxconfigupdater
GIMXCONTROLLER_LDLIBS = -lgimxcontroller
GIMXLOG_LDLIBS = -lgimxlog
GIMXHID_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxhid
GIMXINPUT_LDLIBS = $(GIMXHID_LDLIBS) -lgimxinput
GIMXPOLL_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxpoll
GIMXPRIO_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxprio
GIMXSERIAL_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxserial
GIMXTIMER_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxtimer
GIMXUHID_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxuhid
GIMXUSB_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxusb
GIMXGPP_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxgpp
GIMXUPDATER_LDLIBS = -lgimxdownloader -lgimxupdater
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