-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile_win64
42 lines (31 loc) · 1.16 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
PROG_SOURCE = yktrl.cpp
SOURCE += commandParser.cpp
SOURCE += ykushxs/ykushxs.cpp
SOURCE += ykush/ykush.cpp
SOURCE += ykush2/ykush2.cpp
SOURCE += ykush3/ykush3.cpp
SOURCE += yk_usb_device.cpp
SOURCE += help/ykush_help.cpp
SOURCE += utils/command_parser.cpp
SOURCE += utils/string2val.cpp
SOURCE_FULL = $(addprefix src/, $(SOURCE))
PROG_SOURCE_FULL = $(addprefix src/, $(PROG_SOURCE))
OBJS = $(SOURCE_FULL:.cpp=.o)
PROG_OBJ = $(PROG_SOURCE_FULL:.cpp=.o)
CUR_PATH = $(CURDIR)
INCLUDEPATHS = $(addprefix -I$(CUR_PATH)/, $(dir $(SOURCE_FULL)) hidapi )
LOADPATHS = -L$(CUR_PATH)/hidapi/mingw32
LIBS = -lhidapi
FLAGS = -static-libgcc -static-libstdc++
#Change MinGW exec name to match version instaled in your system
CPP = x86_64-w64-mingw32-g++
#CPP_WIN32 = i686-w64-mingw32-g++
#CPP_WIN64 = x86_64-w64-mingw32-g++
ykushcmd_win64.exe : $(PROG_OBJ) $(OBJS)
$(CPP) $(FLAGS) $(LOADPATHS) -o bin/Win32/$@ $(PROG_OBJ) $(OBJS) $(LIBS)
$(PROG_OBJ) : %.o : %.cpp
$(CPP) $(FLAGS) $(PREPROCESSOR_DEFS) $(INCLUDEPATHS) -c $< -o $@
$(OBJS) : %.o : %.cpp %.h
$(CPP) $(FLAGS) $(PREPROCESSOR_DEFS) $(INCLUDEPATHS) -c $< -o $@
clean :
rm -f bin/Win64/yktrl_win32.exe $(OBJS) $(PROG_OBJ)