Brett Weiland 8db9e4cfba init
2023-01-22 15:34:25 -06:00

22 lines
378 B
Makefile

CCOPTS=-ggdb -O0 -Wall -lpng -pthread
OUTFILE=mandelbrot
SRCFILES := $(wildcard *.cpp)
OBJFILES := $(patsubst %.cpp,build/%.o,$(SRCFILES))
all: $(OBJFILES)
g++ $(CCOPTS) -o $(OUTFILE) $(OBJFILES)
build/%.o: %.cpp
if [ ! -d "build" ]; then mkdir -p build; fi
g++ $(CCOPTS) -c -o $@ $<
clean:
rm -f build/*.o
rm -f *.out
rm -f compile_commands.json
run:
./$(OUTFILE)