2024-04-22 22:44:10 -06:00
|
|
|
|
|
|
|
CXX := g++
|
|
|
|
CXXFLAGS := -std=c++11 -c
|
|
|
|
LDFLAGS := -g
|
2024-04-23 11:37:02 -06:00
|
|
|
LDLIBS= -lglfw
|
2024-04-22 22:44:10 -06:00
|
|
|
|
2024-04-23 13:15:47 -06:00
|
|
|
srcfiles := $(wildcard src/*.cpp)
|
2024-04-22 22:44:10 -06:00
|
|
|
objfiles := $(subst src,obj,$(subst .cpp,.o,$(srcfiles)))
|
|
|
|
|
2024-04-23 07:46:02 -06:00
|
|
|
all: main.out
|
2024-04-22 22:44:10 -06:00
|
|
|
|
2024-04-23 07:46:02 -06:00
|
|
|
main.out: $(objfiles)
|
2024-04-23 13:15:47 -06:00
|
|
|
$(CXX) $(LDFLAGS) -o $@ $(objfiles) $(LDLIBS)
|
2024-04-22 22:44:10 -06:00
|
|
|
|
|
|
|
obj/%.o: src/%.cpp
|
|
|
|
mkdir -p obj
|
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $<
|