Makefile 853 B

1234567891011121314151617181920212223
  1. CUR_PATH = $(shell echo $(PWD))
  2. OBJS = $(addprefix ykushcmd/objs/,ykushcmd.o commandParser.o usbcom.o)
  3. LIBS = -lhidapi-libusb -lusb-1.0 -ludev
  4. LOADPATHS = -L$(CUR_PATH)/ykushcmd/linux
  5. PREPROCESSOR_DEFS = -DLINUX
  6. CPP = g++
  7. ykushcmd : $(OBJS)
  8. $(CPP) $(LOADPATHS) -o bin/ykushcmd $(OBJS) $(LIBS)
  9. ykushcmd/objs/ykushcmd.o : ykushcmd/ykushcmd.cpp ykushcmd/commandParser.h
  10. $(CPP) $(PREPROCESSOR_DEFS) -c ykushcmd/ykushcmd.cpp -o ykushcmd/objs/ykushcmd.o
  11. ykushcmd/objs/commandParser.o : ykushcmd/commandParser.cpp ykushcmd/commandParser.h ykushcmd/usbcom.h
  12. $(CPP) $(PREPROCESSOR_DEFS) -c ykushcmd/commandParser.cpp -o ykushcmd/objs/commandParser.o
  13. ykushcmd/objs/usbcom.o : ykushcmd/usbcom.cpp ykushcmd/linux/hidapi.h ykushcmd/usbcom.h
  14. $(CPP) $(PREPROCESSOR_DEFS) -c ykushcmd/usbcom.cpp -o ykushcmd/objs/usbcom.o
  15. clean :
  16. rm -f bin/ykushcmd $(OBJS)