aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNicholas Tay <nick@windblume.net>2022-04-28 21:54:45 +1000
committerNicholas Tay <nick@windblume.net>2022-04-28 21:54:45 +1000
commit30547ed47ab653586073ae87d0c986c14ddaf241 (patch)
treeec565bb08ae384abd07f5e6e49651a30f26b4af3 /Makefile
parent1783cfd9965c38d60cea3daff172c6657983719b (diff)
downloadclak-30547ed47ab653586073ae87d0c986c14ddaf241.tar.gz
clak-30547ed47ab653586073ae87d0c986c14ddaf241.tar.bz2
clak-30547ed47ab653586073ae87d0c986c14ddaf241.zip
Iterate boards in C
Diffstat (limited to '')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2635da2..c2a94a6 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,9 @@ $(NAME): $(NAME).c $(BOARD_FILES) board/boards.h
board/boards.h:
printf "#ifndef BOARD_DEFAULTS_H\n#define BOARD_DEFAULTS_H\n\n" > board/boards.h
for board in $(BOARDS); do echo "#include \"$$board/board.h\"" >> board/boards.h; done
- printf "\n#endif /* BOARD_DEFAULTS_H */" >> board/boards.h
+ printf "\n#define BOARDS " >> board/boards.h
+ for board in $(BOARDS); do printf "BOARD(\"$$board\", board_$${board}_board_down_wav) " >> board/boards.h; done
+ printf "\n\n#endif /* BOARD_DEFAULTS_H */" >> board/boards.h
$(BOARD_FILES): %.h: %_down.wav
xxd -i "$<" "$@"