thrive/01_text_adventure/Makefile

19 lines
384 B
Makefile

CC=gcc
CFLAGS=-Wall -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
.PHONY: clean run
game: data/actions.c data/rooms.c data/transitions.c data/words.c data/flags.c *.c
$(CC) *.c $(CFLAGS) -o game
data/%.c: data/%.txt
echo -n "char *data_$*_txt = \"" > data/$*.c
cat data/$*.txt | perl -pe 's/\n/\\n/g' >> data/$*.c
echo "\";" >> data/$*.c
run: game
./game
clean:
rm -f ./game