I'm creating a group of ATMega devices with different programs. They share lot's of files like classes.
I want to create a makfile that will contain something like:
DEVICE1DEPS = first.o second.o thrid.o
DEVICE2DEPS = second.o thrid.o fourth.o
...
Then I want to be able to write make device1 and have
$(CC) $(CFLAGS) -I./ -o device1.out $(device1deps)
I also have a rule called program to write my program on chip I want to be able to write make device1 program / make program device1 to execute
avrdude -p t2313 -c dapa -e -U flash:w:device1.hex
How to do that?