Makefile_win32 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. PROG_SOURCE = yktrl.cpp
  2. SOURCE += commandParser.cpp
  3. SOURCE += ykushxs/ykushxs.cpp
  4. SOURCE += ykush/ykush.cpp
  5. SOURCE += ykush2/ykush2.cpp
  6. SOURCE += ykush3/ykush3.cpp
  7. SOURCE += yk_usb_device.cpp
  8. SOURCE += help/ykush_help.cpp
  9. SOURCE += utils/command_parser.cpp
  10. SOURCE += utils/string2val.cpp
  11. SOURCE_FULL = $(addprefix src/, $(SOURCE))
  12. PROG_SOURCE_FULL = $(addprefix src/, $(PROG_SOURCE))
  13. OBJS = $(SOURCE_FULL:.cpp=.o)
  14. PROG_OBJ = $(PROG_SOURCE_FULL:.cpp=.o)
  15. CUR_PATH = $(CURDIR)
  16. INCLUDEPATHS = $(addprefix -I$(CUR_PATH)/, $(dir $(SOURCE_FULL)) hidapi )
  17. LOADPATHS = -L$(CUR_PATH)/hidapi/mingw32
  18. LIBS = -lhidapi
  19. FLAGS = -static-libgcc -static-libstdc++
  20. #Change MinGW exec name to match version instaled in your system
  21. CPP = i686-w64-mingw32-g++
  22. #CPP_WIN32 = i686-w64-mingw32-g++
  23. #CPP_WIN64 = x86_64-w64-mingw32-g++
  24. ykushcmd_win32.exe : $(PROG_OBJ) $(OBJS)
  25. $(CPP) $(FLAGS) $(LOADPATHS) -o bin/Win32/$@ $(PROG_OBJ) $(OBJS) $(LIBS)
  26. $(PROG_OBJ) : %.o : %.cpp
  27. $(CPP) $(FLAGS) $(PREPROCESSOR_DEFS) $(INCLUDEPATHS) -c $< -o $@
  28. $(OBJS) : %.o : %.cpp %.h
  29. $(CPP) $(FLAGS) $(PREPROCESSOR_DEFS) $(INCLUDEPATHS) -c $< -o $@
  30. clean :
  31. rm -f bin/Win32/yktrl_win32.exe $(OBJS) $(PROG_OBJ)