Skip to content

Commit

Permalink
Tweaked Makefile
Browse files Browse the repository at this point in the history
Nothing functional

Signed-off-by: Michel Pollet <[email protected]>
  • Loading branch information
buserror committed Sep 8, 2024
1 parent 683dbe6 commit bf6cb9e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,18 @@ test/asm/%.bin : test/asm/%.asm | $(BIN)/mii_asm
.PHONY : roms
define rom_to_h
$(1) :
if [ ! -f $$@ ]; then \
@if [ ! -f $$@ ]; then \
echo "ROM file $$@ not found, relying on the exiting .h"; \
touch $$@; \
fi
src/roms/$(2).h : $(1)
if [ ! -s "$$<" ]; then \
@if [ ! -s "$$<" ]; then \
touch $$@; \
else { echo "#pragma once"; \
xxd -n $$(shell basename $$<|sed 's/_[0-9].*//') -i $$< |\
sed 's/unsigned/static const unsigned/' ; \
}>$$@ ; \
echo "ROM $$@ Generated"; \
fi

$(OBJ)/mii.o : src/roms/$(2).h
Expand All @@ -159,6 +160,7 @@ $(eval $(call rom_to_h,test/asm/mii_smartport_driver.bin,mii_rom_smartport))
clean :
rm -rf $(O); make -C libmui clean; make -C libmish clean

.PHONY : watch tests
# This is for development purpose. This will recompile the project
# everytime a file is modified.
watch :
Expand Down Expand Up @@ -229,6 +231,8 @@ lsp:

DESTDIR := /usr/local

.PHONY : install avail

install:
mkdir -p $(DESTDIR)/bin
cp $(BIN)/mii_emu_gl $(DESTDIR)/bin/
Expand Down

0 comments on commit bf6cb9e

Please sign in to comment.