From 8db9e4cfba7de89b5492203ed1b225297be47f68 Mon Sep 17 00:00:00 2001 From: Brett Weiland Date: Sun, 22 Jan 2023 15:34:25 -0600 Subject: init --- makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 makefile (limited to 'makefile') diff --git a/makefile b/makefile new file mode 100644 index 0000000..fad6a86 --- /dev/null +++ b/makefile @@ -0,0 +1,21 @@ +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) -- cgit v1.2.3