rearrange Makefile, hopefully easier to access tunables for first-timers
This commit is contained in:
parent
41f68be450
commit
a4b0c2f848
61
Makefile
61
Makefile
|
|
@ -23,39 +23,19 @@
|
||||||
# #
|
# #
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# #
|
|
||||||
# Change these to suit your application #
|
|
||||||
# #
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
PROGRAM = mendel
|
|
||||||
|
|
||||||
SOURCES = $(PROGRAM).c serial.c dda.c gcode_parse.c gcode_process.c timer.c temp.c sermsg.c dda_queue.c watchdog.c debug.c sersendf.c heater.c analog.c delay.c intercom.c pinio.c
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# #
|
# #
|
||||||
# Change these to suit your hardware #
|
# Change these to suit your hardware #
|
||||||
# #
|
# #
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
#MCU_TARGET = atmega168
|
# MCU_TARGET = atmega168
|
||||||
# MCU_TARGET = atmega328p
|
# MCU_TARGET = atmega328p
|
||||||
MCU_TARGET = atmega644p
|
MCU_TARGET = atmega644p
|
||||||
#MCU_TARGET = atmega1280
|
# MCU_TARGET = atmega1280
|
||||||
|
|
||||||
F_CPU = 16000000L
|
F_CPU = 16000000L
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# #
|
|
||||||
# These defaults should be ok, change if you need to #
|
|
||||||
# #
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
ARCH = avr-
|
|
||||||
CC = $(ARCH)gcc
|
|
||||||
OBJDUMP = $(ARCH)objdump
|
|
||||||
OBJCOPY = $(ARCH)objcopy
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# #
|
# #
|
||||||
# Available Defines: #
|
# Available Defines: #
|
||||||
|
|
@ -70,16 +50,20 @@ OBJCOPY = $(ARCH)objcopy
|
||||||
# enables start/stop ramping #
|
# enables start/stop ramping #
|
||||||
# GEN3 #
|
# GEN3 #
|
||||||
# build for standard reprap electronics instead of your custom rig #
|
# build for standard reprap electronics instead of your custom rig #
|
||||||
|
# HOST #
|
||||||
|
# this is the motherboard for GEN3- don't touch! Extruder has its own #
|
||||||
|
# Makefile. #
|
||||||
# #
|
# #
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
DEFS = -DF_CPU=$(F_CPU) -DHOST -DGEN3
|
DEFS = -DF_CPU=$(F_CPU) -DHOST -DGEN3
|
||||||
# DEFS += "-DDEBUG=1"
|
# DEFS += "-DDEBUG=1"
|
||||||
|
|
||||||
OPTIMIZE = -Os -ffunction-sections -finline-functions-called-once -mcall-prologues
|
##############################################################################
|
||||||
# OPTIMIZE = -O0
|
# #
|
||||||
CFLAGS = -g -Wall -Wstrict-prototypes $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS) -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -save-temps
|
# Programmer settings for "make program" #
|
||||||
LDFLAGS = -Wl,--as-needed -Wl,--gc-sections
|
# #
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
AVRDUDE = avrdude
|
AVRDUDE = avrdude
|
||||||
AVRDUDECONF = /etc/avrdude.conf
|
AVRDUDECONF = /etc/avrdude.conf
|
||||||
|
|
@ -92,12 +76,35 @@ AVRDUDECONF = /etc/avrdude.conf
|
||||||
# MODE="0660" #
|
# MODE="0660" #
|
||||||
# #
|
# #
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
PROGPORT = /dev/arduino
|
PROGPORT = /dev/arduino
|
||||||
|
|
||||||
# atmega168
|
# atmega168
|
||||||
#PROGBAUD = 19200
|
#PROGBAUD = 19200
|
||||||
# atmega328p, 644p, 1280
|
# atmega328p, 644p, 1280
|
||||||
PROGBAUD = 57600
|
PROGBAUD = 57600
|
||||||
|
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# #
|
||||||
|
# These defaults should be ok, change if you need to #
|
||||||
|
# #
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
PROGRAM = mendel
|
||||||
|
|
||||||
|
SOURCES = $(PROGRAM).c serial.c dda.c gcode_parse.c gcode_process.c timer.c temp.c sermsg.c dda_queue.c watchdog.c debug.c sersendf.c heater.c analog.c delay.c intercom.c pinio.c
|
||||||
|
|
||||||
|
ARCH = avr-
|
||||||
|
CC = $(ARCH)gcc
|
||||||
|
OBJDUMP = $(ARCH)objdump
|
||||||
|
OBJCOPY = $(ARCH)objcopy
|
||||||
|
|
||||||
|
OPTIMIZE = -Os -ffunction-sections -finline-functions-called-once -mcall-prologues
|
||||||
|
# OPTIMIZE = -O0
|
||||||
|
CFLAGS = -g -Wall -Wstrict-prototypes $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS) -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -save-temps
|
||||||
|
LDFLAGS = -Wl,--as-needed -Wl,--gc-sections
|
||||||
|
|
||||||
OBJ = $(patsubst %.c,%.o,${SOURCES})
|
OBJ = $(patsubst %.c,%.o,${SOURCES})
|
||||||
|
|
||||||
.PHONY: all program clean size
|
.PHONY: all program clean size
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue