diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-01-14 15:42:55 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-01-14 15:42:55 +0100 |
commit | 4399a137a900a7d4bcbc862d85c87c92dd27d89b (patch) | |
tree | 77fcf9caaac0c740402fd9525d4191de79c10bd1 /Makefile | |
parent | 3ee9280284b1d9de2a2c675aa2fb251e02b98c78 (diff) |
C++ test (TODO: distinguish between C/C++ in Makefile, use one file per class)
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,7 +1,7 @@ MCU ?= attiny88 AVRDUDE_PROGRAMMER ?= usbasp -AVRCC ?= avr-gcc +AVRCC ?= avr-g++ AVRFLASH ?= avrdude AVRNM ?= avr-nm AVROBJCOPY ?= avr-objcopy @@ -9,9 +9,9 @@ AVROBJDUMP ?= avr-objdump CFLAGS += -mmcu=attiny88 -DF_CPU=8000000UL # CFLAGS += -gdwarf-2 -CFLAGS += -I. -std=gnu99 -Os -Wall -Wextra -pedantic +CFLAGS += -std=c++11 -I. -Os -Wall -Wextra -pedantic CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -CFLAGS += -fwhole-program -flto -mstrict-X +CFLAGS += -fwhole-program -flto -fno-rtti -fno-exceptions -mstrict-X AVRFLAGS += -U lfuse:w:0xee:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m AVRFLAGS += -U flash:w:main.hex @@ -24,8 +24,8 @@ AVRFLAGS += -U flash:w:main.hex ${AVROBJCOPY} -j .eeprom --set-section-flags=.eeprom="alloc,load" \ --change-section-lma .eeprom=0 -O ihex $< $@ -main.elf: main.c - ${AVRCC} ${CFLAGS} -o $@ ${@:.elf=.c} -Wl,-Map=main.map,--cref +main.elf: main.cc + ${AVRCC} ${CFLAGS} -o $@ ${@:.elf=.cc} -Wl,-Map=main.map,--cref @echo @avr-size --format=avr --mcu=${MCU} $@ |