Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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 $@ $<