From 411807b4b8c6759d4f3f59cedd0ece23b6016249 Mon Sep 17 00:00:00 2001 From: ribbon-otter Date: Wed, 19 Oct 2022 15:03:19 -0700 Subject: [PATCH] add Unix makefile --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2125ac0 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +game_name := example-game +warning_level := -Wall +CFLAGS := $(warning_level) $(shell pkg-config --cflags glfw3) $(shell pkg-config --cflags glm) +CLIBS := $(shell pkg-config --static --libs glfw3) $(shell pkg-config --static --libs glm) + +example-game : $(patsubst %.cpp,%.o,$(wildcard *.cpp)) Makefile + $(CXX) $(CFLAGS) -o ${game_name} *.o $(CLIBS) + +.PHONY : clean +clean :; rm -f *.o ${game_name} + +%.o : %.cpp *.hpp; $(CXX) -c $(CFLAGS) -o $@ $< + +