From bc4897e81a19c7d7c07479df2d3c77c3b0f6d7e4 Mon Sep 17 00:00:00 2001 From: Kevin <6500490+Zeturic@users.noreply.github.com> Date: Wed, 5 Jul 2023 19:04:32 -0400 Subject: [PATCH] use backticks instead of shell function --- makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index 6b6ae41..48e1471 100644 --- a/makefile +++ b/makefile @@ -50,10 +50,10 @@ md5: test.gba # ------------------------------------------------------------------------------ build/linked.sz: build/linked.o - echo "$(shell $(SIZE) $(SIZEFLAGS) build/linked.o | awk 'FNR == 2 {print $$4}') + 8" | bc > "$@" + echo "`$(SIZE) $(SIZEFLAGS) build/linked.o | awk 'FNR == 2 {print $$4}'` + 8" | bc > "$@" build/linked.alloc: rom.gba build/linked.sz - $(FREESIA) $(FREESIAFLAGS) --needed-bytes $(shell cat build/linked.sz) > "$@" + $(FREESIA) $(FREESIAFLAGS) --needed-bytes `cat build/linked.sz` > "$@" build/src/%.o: src/%.c charmap.txt @mkdir -p build/src @@ -64,6 +64,9 @@ build/linked.o: $(OBJ_FILES) rom.ld $(LD) $(LDFLAGS) $(OBJ_FILES) -o "$@" test.gba: rom.gba main.asm build/linked.o build/linked.sz build/linked.alloc $(MAIN_ASM_INCLUDES) - $(ARMIPS) $(ARMIPS_FLAGS) main.asm -definelabel allocation $(shell cat build/linked.alloc) -equ allocation_size $(shell cat build/linked.sz) + $(ARMIPS) $(ARMIPS_FLAGS) main.asm -definelabel allocation `cat build/linked.alloc` -equ allocation_size `cat build/linked.sz` + +wow: + @echo $(SIZE) -include $(SRC_FILES:src/%.c=build/src/%.d)