2024-04-22 22:44:10 -06:00
|
|
|
|
|
|
|
CXX := g++
|
|
|
|
CXXFLAGS := -std=c++11 -c
|
|
|
|
LDFLAGS := -g
|
|
|
|
LDLIBS=
|
|
|
|
|
|
|
|
srcfiles := $(wildcard */*.cpp)
|
|
|
|
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)
|
|
|
|
$(CXX) $(LDFLAGS) -o $@ $< $(LDLIBS)
|
2024-04-22 22:44:10 -06:00
|
|
|
|
|
|
|
obj/%.o: src/%.cpp
|
|
|
|
mkdir -p obj
|
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $<
|