From f52ce027a6ca68193d1e4481c4bd91a9e59a026b Mon Sep 17 00:00:00 2001 From: Maix0 <39835848+Maix0@users.noreply.github.com> Date: Mon, 13 Apr 2026 15:14:24 +0200 Subject: [PATCH] fix(avr-libc): no longer build avr-libc --- ex01/Makefile | 11 +---------- ex02/Makefile | 13 ++----------- ex03/Makefile | 12 +----------- ex04/Makefile | 14 ++------------ 4 files changed, 6 insertions(+), 44 deletions(-) diff --git a/ex01/Makefile b/ex01/Makefile index d0f7e1f..dd99651 100644 --- a/ex01/Makefile +++ b/ex01/Makefile @@ -1,5 +1,3 @@ -AVR_LIBC_DIR=/tmp/avr-libc - # Makefile MCU=atmega328p F_CPU=16000000 @@ -36,7 +34,7 @@ flash: hex $(OBJ_DIR)/$(TARGET).bin: $(OBJ) $(CC) $(CFLAGS) $(OBJ) -o $@ -$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(AVR_LIBC_DIR)/.CACHETAG +$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c mkdir -p $(shell dirname $@) $(CC) $(CFLAGS) -c $< -o $@ @@ -44,10 +42,3 @@ $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(AVR_LIBC_DIR)/.CACHETAG $(TARGET).hex: $(OBJ_DIR)/$(TARGET).bin $(OBJCOPY) -j .text -j .data -O ihex $< $@ -$(AVR_LIBC_DIR)/.CACHETAG: - rm -rf $(AVR_LIBC_DIR) - git clone --depth=1 https://github.com/avrdudes/avr-libc/ $(AVR_LIBC_DIR) - cd $(AVR_LIBC_DIR) && ./bootstrap - cd $(AVR_LIBC_DIR) && ./configure --build=`./config.guess` --host=avr - cd $(AVR_LIBC_DIR) && make -j - touch $(AVR_LIBC_DIR)/.CACHETAG diff --git a/ex02/Makefile b/ex02/Makefile index d0f7e1f..caed2b4 100644 --- a/ex02/Makefile +++ b/ex02/Makefile @@ -1,11 +1,9 @@ -AVR_LIBC_DIR=/tmp/avr-libc - # Makefile MCU=atmega328p F_CPU=16000000 CC=avr-gcc OBJCOPY=avr-objcopy -CFLAGS=-nostdlib -std=c99 -Wall -Wextra -g -Os -mmcu=$(MCU) -DF_CPU=$(F_CPU) -I. -I$(AVR_LIBC_DIR)/include +CFLAGS=-nostdlib -std=c99 -Wall -Wextra -g -Os -mmcu=$(MCU) -DF_CPU=$(F_CPU) -I. TARGET=main SERIAL=-P /dev/ttyUSB0 -b 115200 @@ -36,7 +34,7 @@ flash: hex $(OBJ_DIR)/$(TARGET).bin: $(OBJ) $(CC) $(CFLAGS) $(OBJ) -o $@ -$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(AVR_LIBC_DIR)/.CACHETAG +$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c mkdir -p $(shell dirname $@) $(CC) $(CFLAGS) -c $< -o $@ @@ -44,10 +42,3 @@ $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(AVR_LIBC_DIR)/.CACHETAG $(TARGET).hex: $(OBJ_DIR)/$(TARGET).bin $(OBJCOPY) -j .text -j .data -O ihex $< $@ -$(AVR_LIBC_DIR)/.CACHETAG: - rm -rf $(AVR_LIBC_DIR) - git clone --depth=1 https://github.com/avrdudes/avr-libc/ $(AVR_LIBC_DIR) - cd $(AVR_LIBC_DIR) && ./bootstrap - cd $(AVR_LIBC_DIR) && ./configure --build=`./config.guess` --host=avr - cd $(AVR_LIBC_DIR) && make -j - touch $(AVR_LIBC_DIR)/.CACHETAG diff --git a/ex03/Makefile b/ex03/Makefile index d0f7e1f..588b731 100644 --- a/ex03/Makefile +++ b/ex03/Makefile @@ -1,5 +1,3 @@ -AVR_LIBC_DIR=/tmp/avr-libc - # Makefile MCU=atmega328p F_CPU=16000000 @@ -36,18 +34,10 @@ flash: hex $(OBJ_DIR)/$(TARGET).bin: $(OBJ) $(CC) $(CFLAGS) $(OBJ) -o $@ -$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(AVR_LIBC_DIR)/.CACHETAG +$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c mkdir -p $(shell dirname $@) $(CC) $(CFLAGS) -c $< -o $@ $(TARGET).hex: $(OBJ_DIR)/$(TARGET).bin $(OBJCOPY) -j .text -j .data -O ihex $< $@ - -$(AVR_LIBC_DIR)/.CACHETAG: - rm -rf $(AVR_LIBC_DIR) - git clone --depth=1 https://github.com/avrdudes/avr-libc/ $(AVR_LIBC_DIR) - cd $(AVR_LIBC_DIR) && ./bootstrap - cd $(AVR_LIBC_DIR) && ./configure --build=`./config.guess` --host=avr - cd $(AVR_LIBC_DIR) && make -j - touch $(AVR_LIBC_DIR)/.CACHETAG diff --git a/ex04/Makefile b/ex04/Makefile index d0f7e1f..e74b964 100644 --- a/ex04/Makefile +++ b/ex04/Makefile @@ -1,11 +1,9 @@ -AVR_LIBC_DIR=/tmp/avr-libc - # Makefile MCU=atmega328p F_CPU=16000000 CC=avr-gcc OBJCOPY=avr-objcopy -CFLAGS=-nostdlib -std=c99 -Wall -Wextra -g -Os -mmcu=$(MCU) -DF_CPU=$(F_CPU) -I. -I$(AVR_LIBC_DIR)/include +CFLAGS=-nostdlib -std=c99 -Wall -Wextra -g -Os -mmcu=$(MCU) -DF_CPU=$(F_CPU) -I. TARGET=main SERIAL=-P /dev/ttyUSB0 -b 115200 @@ -36,18 +34,10 @@ flash: hex $(OBJ_DIR)/$(TARGET).bin: $(OBJ) $(CC) $(CFLAGS) $(OBJ) -o $@ -$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(AVR_LIBC_DIR)/.CACHETAG +$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c mkdir -p $(shell dirname $@) $(CC) $(CFLAGS) -c $< -o $@ $(TARGET).hex: $(OBJ_DIR)/$(TARGET).bin $(OBJCOPY) -j .text -j .data -O ihex $< $@ - -$(AVR_LIBC_DIR)/.CACHETAG: - rm -rf $(AVR_LIBC_DIR) - git clone --depth=1 https://github.com/avrdudes/avr-libc/ $(AVR_LIBC_DIR) - cd $(AVR_LIBC_DIR) && ./bootstrap - cd $(AVR_LIBC_DIR) && ./configure --build=`./config.guess` --host=avr - cd $(AVR_LIBC_DIR) && make -j - touch $(AVR_LIBC_DIR)/.CACHETAG