thrive/01_text_adventure/Makefile

19 lines
337 B
Makefile

CC=gcc
CFLAGS=-Wall -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
.PHONY: clean run
game: rooms.data transitions.data *.c
$(CC) *.c $(CFLAGS) -o game
%.data: 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