diff options
author | Brett Weiland <brett_weiland@bpcspace.com> | 2023-01-22 15:34:25 -0600 |
---|---|---|
committer | Brett Weiland <brett_weiland@bpcspace.com> | 2023-01-22 15:34:25 -0600 |
commit | 8db9e4cfba7de89b5492203ed1b225297be47f68 (patch) | |
tree | 4e21e076bbaabf7b0b37d54e0c9c2eefd8409d5f /makefile |
init
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 21 |
1 files changed, 21 insertions, 0 deletions
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) |