Makefile_tests 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. PROG_SOURCE = tests/test_usbhid.cpp
  2. SOURCE += usbhid/usbhid.cpp
  3. SOURCE_FULL = $(addprefix src/, $(SOURCE))
  4. PROG_SOURCE_FULL = $(addprefix src/, $(PROG_SOURCE))
  5. OBJS = $(SOURCE_FULL:.cpp=.o)
  6. PROG_OBJ = $(PROG_SOURCE_FULL:.cpp=.o)
  7. CUR_PATH = $(shell echo $(PWD))
  8. INCLUDEPATHS = $(addprefix -I$(CUR_PATH)/, $(dir $(SOURCE_FULL)))
  9. LOADPATHS =
  10. LIBS = -lusb-1.0
  11. CPP = g++
  12. #OBJS = $(addprefix src/objs/, ykushcmd.o commandParser.o ykushxs.o yk_usb_device.o ykush.o ykush_help.o ykush2.o ykush3.o command_parser.o string2val.o)
  13. #LOADPATHS = -L$(CUR_PATH)/src/linux
  14. #INCLUDEPATHS= -I$(CUR_PATH)/src/linux -I$(CUR_PATH)/src/ykushxs -I$(CUR_PATH)/src/ykush -I$(CUR_PATH)/src -I$(CUR_PATH)/src/help -I$(CUR_PATH)/src/ykush2 -I$(CUR_PATH)/src/ykush3 -I$(CUR_PATH)/src/utils
  15. ykushcmd : $(PROG_OBJ) $(OBJS)
  16. $(CPP) $(LOADPATHS) -o bin/$@ $(PROG_OBJ) $(OBJS) $(LIBS)
  17. $(PROG_OBJ) : %.o : %.cpp
  18. $(CPP) $(PREPROCESSOR_DEFS) $(INCLUDEPATHS) -c $< -o $@
  19. $(OBJS) : %.o : %.cpp %.h
  20. $(CPP) $(PREPROCESSOR_DEFS) $(INCLUDEPATHS) -c $< -o $@
  21. clean :
  22. rm -f bin/ykushcmd $(OBJS) $(PROG_OBJ)