Ein Roboter mit bürstenlosem Antrieb, differenzial und NRF24L01 Funk. Großflächig gebaut um ein großes Solarpanel aufzunehmen. https://gitlab.informatik.hs-fulda.de/fdai5253/roboter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.5 KiB

  1. #############################################################################
  2. #
  3. # Makefile for librf24 examples on Linux
  4. #
  5. # License: GPL (General Public License)
  6. # Author: gnulnulf <arco@appeltaart.mine.nu>
  7. # Date: 2013/02/07 (version 1.0)
  8. #
  9. # Description:
  10. # ------------
  11. # use make all and make install to install the examples
  12. #
  13. BINARY_PREFIX = rf24
  14. SOURCES = $(PROGRAMS:=.cpp)
  15. LIBS=-l$(LIB)
  16. ifeq ($(DRIVER), LittleWire)
  17. LIBS+= -llittlewire-spi
  18. endif
  19. all: $(PROGRAMS)
  20. $(PROGRAMS): $(SOURCES)
  21. $(CXX) $(CFLAGS) -I$(HEADER_DIR)/.. -I.. -L$(LIB_DIR) $@.cpp $(LIBS) -o $@
  22. clean:
  23. @echo "[Cleaning]"
  24. rm -rf $(PROGRAMS)
  25. install: all
  26. @echo "[Installing examples to $(EXAMPLES_DIR)]"
  27. @mkdir -p $(EXAMPLES_DIR)
  28. @for prog in $(PROGRAMS); do \
  29. install -m 0755 $${prog} $(EXAMPLES_DIR)/$(BINARY_PREFIX)-$${prog}; \
  30. done
  31. upload: all
  32. @echo "[Uploading examples to $(REMOTE):$(REMOTE_EXAMPLES_DIR)]"
  33. ifeq ($(REMOTE),)
  34. @echo "[ERROR] Remote machine not configured. Run configure with respective arguments."
  35. @exit 1
  36. endif
  37. @ssh -q -t -p $(REMOTE_PORT) $(REMOTE) "mkdir -p $(REMOTE_EXAMPLES_DIR)"
  38. @ssh -q -t -p $(REMOTE_PORT) $(REMOTE) "mkdir -p /tmp/RF24_examples"
  39. @scp -q -P $(REMOTE_PORT) $(PROGRAMS) $(REMOTE):/tmp/RF24_examples
  40. @for prog in $(PROGRAMS); do \
  41. ssh -q -t -p $(REMOTE_PORT) $(REMOTE) "sudo install -m 0755 /tmp/RF24_examples/$${prog} $(REMOTE_EXAMPLES_DIR)/$(BINARY_PREFIX)-$${prog}"; \
  42. done
  43. @ssh -q -t -p $(REMOTE_PORT) $(REMOTE) "rm -rf /tmp/RF24_examples"
  44. .PHONY: install upload