]> git.tdb.fi Git - model-railway-devices.git/blobdiff - firmware/Makefile
Reorganize the directory structure
[model-railway-devices.git] / firmware / Makefile
diff --git a/firmware/Makefile b/firmware/Makefile
deleted file mode 100644 (file)
index b92db65..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-MCU := atmega328p
-CLOCK := 16000000
-CC := avr-gcc
-FEATURES := LCD_SHIFTREG LCD_ASYNC
-CFLAGS := -Wall -Os -ffunction-sections -fdata-sections -mmcu=$(MCU) -DF_CPU=$(CLOCK) $(patsubst %,-D%,$(FEATURES))
-LDFLAGS := -Os -Wl,--gc-sections -mmcu=$(MCU)
-AVRDUDE := avrdude
-OBJCOPY := avr-objcopy
-ifeq ($(MCU),atmega168)
-BAUD := 19200
-else
-BAUD := 57600
-endif
-
-help:
-       @echo "Targets:"
-       @echo "  %.hex:    Build firmware from %.c"
-       @echo "  upload-%: Upload firmware to AVR"
-       @echo "  clean:    Clean all built files"
-       @echo
-       @echo "Variables:"
-       @echo "  MCU:      Microcontroller type"
-       @echo "            Arduino Duemilanove = atmega328p (default)"
-       @echo "            Arduino Mini = atmega168"
-
-%.hex: %.elf
-       $(OBJCOPY) -O ihex $< $@
-
-%.elf: %.o
-       $(CC) $(LDFLAGS) -o $@ $^
-
-%.o: %.c
-       $(CC) -c $(CFLAGS) -o $@ $<
-
-upload-%: %.hex
-       $(AVRDUDE) -p$(MCU) -carduino -P/dev/ttyUSB0 -b$(BAUD) -D -Uflash:w:$<:i
-
-clean:
-       $(RM) *.hex
-       $(RM) *.elf
-       $(RM) *.o
-
-s88w-t.elf: serial.o timer.o eeprom.o
-s88w-r.elf: serial.o lcd.o timer.o