blob: ba53910577f78cd1b5a3360426c7cd64630a2629 (
plain) (
tree)
|
|
BOARDS = mxblue quack
CC = gcc
CFLAGS += -std=c99 -Wall -Wextra -Wshadow -Werror -pedantic -shared
ifeq ($(OS),Windows_NT)
OUTEXT = dll
else
CFLAGS += -fPIC
UNAME_S := $(shell uname)
ifeq ($(UNAME_S),Linux)
OUTEXT = so
else ifeq ($(UNAME_S),Darwin)
OUTEXT = dylib
endif
endif
default: all
all: $(BOARDS)
# TODO: use "BOARDS" variable to generate this.
# TODO: have some preset for 'simple' board type? also in the c file.
mxblue: mxblue.$(OUTEXT)
quack: quack.$(OUTEXT)
mxblue.$(OUTEXT): mxblue/board.c mxblue/sound.h
$(CC) $(CFLAGS) mxblue/board.c -o mxblue.$(OUTEXT)
quack.$(OUTEXT): quack/board.c quack/sound.h
$(CC) $(CFLAGS) quack/board.c -o quack.$(OUTEXT)
mxblue/sound.h:
xxd -i mxblue/board_down.wav mxblue/sound.h
quack/sound.h:
xxd -i quack/board_down.wav quack/sound.h
clean:
rm -f *.o
rm -f *.dll
rm -f *.so
rm -f */sound.h
|