Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
## CompileLED.o: ../LED/LED.c $(CC) $(INCLUDES) $(CFLAGS) -c $<
## Compileled.o: ../led.c $(CC) $(INCLUDES) $(CFLAGS) -c $<
%.o: %.c $(CC) $(INCLUDES) $(CFLAGS) -c $<
After trying a squillion and one other things I followed Gertlex's advice, and copied the functions from timerx8.c to timerx8.h. Then there was a long process of copying in other functions and variables in them that weren't recognised, until the program built successfully. We'll see where that takes me but it's not an approach that I'd want to take all the time.
DEVICE = atmega168AVRDUDE_DEVICE = m168PROG = -c usbtiny -P usbCFLAGS=-g -Wall -mcall-prologues -mmcu=$(DEVICE) -OsCC=avr-gccOBJ2HEX=avr-objcopyLDFLAGS=-Wl,-gc-sections -Wl,-relaxAVRDUDE=avrdudeTARGET=ledOBJECT_FILES=led.o timerx8.oSRC_FILES=$(OBJECT_FILES:%.o=%.c)all: $(TARGET).hexclean: rm -f *.o *.hex *.obj *.hex%.hex: %.obj $(OBJ2HEX) -R .eeprom -O ihex $< $@%.obj: $(OBJECT_FILES) $(CC) $(CFLAGS) $(OBJECT_FILES) $(LDFLAGS) -o $@program: $(TARGET).hex $(AVRDUDE) -p $(AVRDUDE_DEVICE) $(PROG) -U flash:w:$(TARGET).hex