thrive/01_text_adventure/Makefile

28 lines
781 B
Makefile

CC=gcc
CFLAGS=-Wall -lraylib -lm -lpthread -ldl -lX11
BUTLER=../butler/butler
ITCH_CHANNEL=01-text-adventure-linux-x64-amd
.PHONY: clean run butler_upload
fatal_text_adventure_linux: data/actions.c data/rooms.c data/room_ins.c data/words.c data/flags.c data/items.c *.c
$(CC) *.c $(CFLAGS) -o fatal_text_adventure_linux
data/%.c: data/%.txt
echo "char *data_$*_txt = " > data/$*.c
cat data/$*.txt | \
perl -pe 's/ *\| */|/g' | \
perl -pe 's/^/"/' | \
perl -pe 's/$$/\\n"/' >> data/$*.c
echo ";" >> data/$*.c
run: fatal_text_adventure_linux
./fatal_text_adventure_linux
clean:
rm -f ./fatal_text_adventure_linux
rm -f ./data/*.c
butler_upload: fatal_text_adventure_linux
$(BUTLER) push ./fatal_text_adventure_linux bassguitarbill/fatal-distractions:$(ITCH_CHANNEL)