thrive/01_text_adventure/Makefile

23 lines
560 B
Makefile
Raw Normal View History

2025-01-02 20:57:00 -05:00
CC=gcc
2025-01-21 19:58:04 -05:00
CFLAGS=-Wall -lraylib -lm -lpthread -ldl -lX11
2024-08-28 17:27:35 -04:00
2025-01-02 20:57:00 -05:00
.PHONY: clean run
2025-01-23 20:47:35 -05:00
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
2025-01-02 20:57:00 -05:00
2025-01-12 19:50:11 -05:00
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
2025-01-23 20:47:35 -05:00
run: fatal_text_adventure_linux
./fatal_text_adventure_linux
2024-08-28 17:27:35 -04:00
clean:
2025-01-23 20:47:35 -05:00
rm -f ./fatal_text_adventure_linux
rm -f ./data/*.c