aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNicholas Tay <nick@windblume.net>2022-05-08 01:35:55 +1000
committerNicholas Tay <nick@windblume.net>2022-05-08 01:35:55 +1000
commit5270088f730a7e30155a642dcd5c4e9a80055d7a (patch)
tree021a97b39cfe8cb68ae6a21c353a90cb731380eb /Makefile
parent047544a5af9100ec269e9222213385bc7794f619 (diff)
downloadclak-5270088f730a7e30155a642dcd5c4e9a80055d7a.tar.gz
clak-5270088f730a7e30155a642dcd5c4e9a80055d7a.tar.bz2
clak-5270088f730a7e30155a642dcd5c4e9a80055d7a.zip
More messing around with plugin system
Just more attempts, but I think I'm gonna switch over to dynamic .so/.dll loading. That would be pretty fun to check out.
Diffstat (limited to '')
-rw-r--r--Makefile20
1 files changed, 2 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index bd016b7..bf2bd8f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,9 @@
NAME = clak
PREFIX = $(HOME)/.local
-BOARDS = mxblue quack
-
CC = gcc
CFLAGS += -std=c99 -Wall -Wextra -Wshadow -Werror -pedantic
-BOARD_FILES = $(addsuffix /board.h,$(addprefix board/,$(BOARDS)))
-
ifeq ($(OS),Windows_NT)
LDLIBS = -lWinmm
PLATFORM = win32
@@ -20,21 +16,9 @@ endif
default: $(NAME)
-$(NAME): $(NAME).c platform/$(PLATFORM).c $(BOARD_FILES) board/boards.h
+$(NAME): $(NAME).c platform/$(PLATFORM).c boards.h
$(CC) $(CFLAGS) $(NAME).c platform/$(PLATFORM).c $(LDLIBS) -o $(NAME)
-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#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 "$<" "$@"
-
clean:
rm -f *.o
- rm -f $(NAME)
- rm -f board/boards.h
- rm -f $(BOARD_FILES) \ No newline at end of file
+ rm -f $(NAME) \ No newline at end of file