Advertisement
Guest User

Untitled

a guest
Nov 8th, 2014
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. ### DISCLAIMER
  2. ### This is an example Makefile and it MUST be configured to suit your needs.
  3. ### For detailled explanations about all the avalaible options,
  4. ### please refer to https://github.com/sudar/Arduino-Makefile/blob/master/arduino-mk-vars.md
  5.  
  6. ### PROJECT_DIR
  7. ### This is the path to where you have created/cloned your project
  8. PROJECT_DIR = /Users/bagustrihatmaja/Documents/Projects/MyAwesomeProject
  9.  
  10. ### AVR_GCC_VERSION
  11. ### Check if the version is equal or higher than 4.9
  12. AVR_GCC_VERSION := $(shell expr `avr-gcc -dumpversion | cut -f1` \>= 4.9)
  13.  
  14. ### ARDMK_DIR
  15. ### Path to the Arduino-Makefile directory.
  16. ARDMK_DIR = $(PROJECT_DIR)/Arduino-Makefile
  17.  
  18. ### ARDUINO_DIR
  19. ### Path to the Arduino application and ressources directory.
  20. ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java
  21.  
  22. ### USER_LIB_PATH
  23. ### Path to where the your project's libraries are stored.
  24. USER_LIB_PATH := $(PROJECT_DIR)/lib
  25.  
  26. ### BOARD_TAG
  27. ### It must be set to the board you are currently using. (i.e uno, mega2560, etc.)
  28. BOARD_TAG = mega328
  29.  
  30. ### MONITOR_BAUDRATE
  31. ### It must be set to Serial baudrate value you are using.
  32. MONITOR_BAUDRATE = 115200
  33.  
  34. ### AVR_TOOLS_DIR
  35. ### Path to the AVR tools directory such as avr-gcc, avr-g++, etc.
  36. AVR_TOOLS_DIR = /usr/local
  37.  
  38. ### AVRDDUDE
  39. ### Path to avrdude directory.
  40. AVRDDUDE = /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude
  41.  
  42. ### CFLAGS_STD
  43. CFLAGS_STD = -std=gnu11
  44.  
  45. ### CXXFLAGS_STD
  46. CXXFLAGS_STD = -std=gnu++14
  47.  
  48. ### CPPFLAGS
  49. ### Flags you might want to set for debugging purpose. Comment to stop.
  50. CXXFLAGS = -pedantic -Wall -Wextra
  51.  
  52. ### If avr-gcc -v is higher than 4.9, activate coloring of the output
  53. ifeq "$(AVR_GCC_VERSION)" "1"
  54. CXXFLAGS += -fdiagnostics-color
  55. endif
  56.  
  57. ### MONITOR_PORT
  58. ### The port your board is connected to. Using an '*' tries all the ports and finds the right one.
  59. MONITOR_PORT = /dev/cu.usbmodem*
  60.  
  61. ### don't touch this
  62. CURRENT_DIR = $(shell basename $(CURDIR))
  63.  
  64. ### OBJDIR
  65. ### This is were you put the binaries you just compile using 'make'
  66. OBJDIR = $(PROJECT_DIR)/bin/$(BOARD_TAG)/$(CURRENT_DIR)
  67.  
  68. ### path to Arduino.mk, inside the ARDMK_DIR, don't touch.
  69. include $(ARDMK_DIR)/Arduino.mk
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement