From aa8ed79276c87562a1edf610358a31b9f115048f Mon Sep 17 00:00:00 2001 From: mibi88 Date: Tue, 18 Jul 2023 16:25:46 +0200 Subject: [PATCH] Fixed ext/img.c, removing build directory after compiling to avoid problems when recompiling. --- microfx_src/Makefile | 1 + microfx_src/src/ext/img.c | 2 +- template/Makefile | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/microfx_src/Makefile b/microfx_src/Makefile index d1a97ae..4d3b39c 100644 --- a/microfx_src/Makefile +++ b/microfx_src/Makefile @@ -23,6 +23,7 @@ all: $(OBJ) | $(OUT_DIR)/ $(AR) rsv $(OUT_DIR)/$(OUT) $(addprefix build/, $(notdir $(OBJ))) cp --recursive include $(OUT_DIR)/ cp src/fx98xx.ld $(OUT_DIR)/ + rm -fr $(BUILD) $(BUILD)/%.o: src/% | $(BUILD)/ $(CC) -c $< -o build/$(notdir $@) $(CFLAGS) diff --git a/microfx_src/src/ext/img.c b/microfx_src/src/ext/img.c index ac49335..6f64f45 100644 --- a/microfx_src/src/ext/img.c +++ b/microfx_src/src/ext/img.c @@ -1,5 +1,5 @@ #include "../../include/microfx/ext/img.h" -#include +#include "../../include/microfx/microfx.h" void simage(int sx, int sy, int w, int h, unsigned char *img, int mode) { /* Draws an image from a sprite coder string */ diff --git a/template/Makefile b/template/Makefile index 7eb5bee..92d4c38 100644 --- a/template/Makefile +++ b/template/Makefile @@ -19,6 +19,7 @@ VERSION = v.1.0 all: $(BIN) fxgxa --g1a -n $(NAME) -i $(ICON) --version="$(VERSION)" -o $(NAME).g1a build/$(BIN) sh-elf-objdump -h $(BUILD)/$(ELF) + rm -fr $(BUILD) $(BIN): $(ELF) sh-elf-objcopy -O binary build/$(ELF) build/$(BIN) -R .bss