Skip to content

Commit

Permalink
use backticks instead of shell function
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeturic committed Jul 5, 2023
1 parent a47b85f commit bc4897e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

0 comments on commit bc4897e

Please sign in to comment.