aboutsummaryrefslogtreecommitdiff
path: root/examples/spiblink/Makefile
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-03-09 07:04:55 +0100
committerKarel Kočí <cynerd@email.cz>2017-03-09 07:04:55 +0100
commitdfc471c4f68eba0c054e61dbb3567ee89e3a036f (patch)
tree69b6ee6b5be7da3087d782397cb0ec04734f23a9 /examples/spiblink/Makefile
parent171e8e92686ac65e8f9a2962a975e6863c791a4f (diff)
downloadavr-ioe-dfc471c4f68eba0c054e61dbb3567ee89e3a036f.tar.gz
avr-ioe-dfc471c4f68eba0c054e61dbb3567ee89e3a036f.tar.bz2
avr-ioe-dfc471c4f68eba0c054e61dbb3567ee89e3a036f.zip
Update spiblink example to use examples.mk
Diffstat (limited to 'examples/spiblink/Makefile')
-rw-r--r--examples/spiblink/Makefile66
1 files changed, 0 insertions, 66 deletions
diff --git a/examples/spiblink/Makefile b/examples/spiblink/Makefile
deleted file mode 100644
index 621f237..0000000
--- a/examples/spiblink/Makefile
+++ /dev/null
@@ -1,66 +0,0 @@
-MAKEFLAGS += --no-builtin-rules
-PROJNAME = spiblink
-
-MSRC = master.c
-SSRC = slave.c
-
-MOBJ = $(patsubst %.c,%.o,$(MSRC))
-SOBJ = $(patsubst %.c,%.o,$(SSRC))
-
-.PHONY: all
-ifneq ("$(wildcard config)","") # Checking if configuration exists
-all: master.hex slave.hex
- @echo Now you can flash $^ to your chips.
-else
-all: help
-endif
-
-# Edit here help like you ever want
-.PHONY: help
-help:
- @echo "AVR-IOE USART echo example"
- @echo " all - Build example"
- @echo " config - Start configuration program"
- @echo " menuconfig - NCurses based configuration program"
- @echo " help - Prints this text"
- @echo " clean - Removing all object files generated from source files"
-
-.PHONY: clean
-clean:
- @echo " CLEAN OBJ"
- @$(RM) $(MOBJ) $(SOBJ)
- @echo " CLEAN master and slave *.hex, *.elf"
- @$(RM) master.elf master.hex
- @$(RM) slave.elf slave.hex
- @$(MAKE) -C ../.. clean
-
-# Building targets are available only if configuration is generated
-ifneq ("$(wildcard config)","")
--include config
-# If you want change some standard CFLAGS, change them in configuration not here.
-# Add here only options that should not be applied to avr-ioe also.
-CFLAGS = -I../../include -mmcu=$(MMCU) -imacros ../../.config.h \
- $(shell echo $(CONFCFLAGS)) $(shell echo -DF_CPU=$(F_CPU)000L)
-
-master.elf slave.elf: %.elf: ../../libioe.a %.o
- @echo " LD $@"
- @avr-gcc -Os -mmcu=$(MMCU) $^ -o $@ -L../.. -lioe
-
-master.hex slave.hex: %.hex: %.elf
- @echo " OBJCOPY $@"
- @avr-objcopy -O ihex -R .eeprom $< $@
-
-$(MOBJ) $(SOBJ): %.o: %.c ../../libioe.a
- @echo " CC $@"
- @avr-gcc $(CFLAGS) -c -o $@ $<
-
-../../libioe.a: config
- @CONFIG=$$(readlink -f config) $(MAKE) -C ../.. libioe.a
-endif
-
-config:
- @CONFIG=$$(readlink -f config) $(MAKE) -C ../.. config
-
-.PHONY: menuconfig
-menuconfig:
- @CONFIG=$$(readlink -f config) $(MAKE) -C ../.. menuconfig