Skip to content

Commit

Permalink
Makefile: Add mkdir build where it was missing
Browse files Browse the repository at this point in the history
Signed-off-by: Hector Martin <[email protected]>
  • Loading branch information
marcan committed Mar 9, 2022
1 parent cfbaac1 commit 24b1fd9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,13 @@ build/$(NAME).bin: build/$(NAME)-raw.elf
@$(OBJCOPY) -O binary --strip-debug $< $@

update_tag:
@mkdir -p build
@echo "#define BUILD_TAG \"$$(git describe --always --dirty)\"" > build/build_tag.tmp
@cmp -s build/build_tag.h build/build_tag.tmp 2>/dev/null || \
( mv -f build/build_tag.tmp build/build_tag.h && echo " TAG build/build_tag.h" )

update_cfg:
@mkdir -p build
@echo -ne "$(CFG)" > build/build_cfg.tmp
@cmp -s build/build_cfg.h build/build_cfg.tmp 2>/dev/null || \
( mv -f build/build_cfg.tmp build/build_cfg.h && echo " CFG build/build_cfg.h" )
Expand All @@ -185,14 +187,17 @@ build/build_cfg.h: update_cfg

build/%.bin: data/%.png
@echo " IMG $@"
@mkdir -p "$(dir $@)"
@convert $< -background black -flatten -depth 8 rgba:$@

build/%.o: build/%.bin
@echo " BIN $@"
@mkdir -p "$(dir $@)"
@$(OBJCOPY) -I binary -B aarch64 -O elf64-littleaarch64 $< $@

build/%.bin: font/%.bin
@echo " CP $@"
@mkdir -p "$(dir $@)"
@cp $< $@

build/main.o: build/build_tag.h build/build_cfg.h src/main.c
Expand Down

0 comments on commit 24b1fd9

Please sign in to comment.