From 14876a091a31b10a0cef7aa59a8384b48a059af8 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 12 Apr 2025 22:39:14 -0700 Subject: Modernize the build system --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2316ece --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +CFLAGS=-O2 -Wall -Wextra -Iinclude `pkg-config --cflags ncurses` +LDFLAGS=`pkg-config --libs ncurses` + +yetihack: yetihack.o yeti.o + g++ $(LDFLAGS) -o $@ $^ + +yetihack.o: src/yetihack.cpp include/yeti.h + g++ -c $(CFLAGS) -o $@ $< + +yeti.o: src/yeti.cpp include/yeti.h + g++ -c $(CFLAGS) -o $@ $< + +.PHONY: clean +clean: + rm *.o yetihack -- cgit v1.3.1