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
|
2025-01-18 06:43:22 -05:00
|
|
|
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-11 08:30:48 -05:00
|
|
|
|
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
|
2025-01-18 06:43:22 -05:00
|
|
|
rm -f ./data/*.c
|