From 1375560cb4b55a2e990b0e206688c22099d8c542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Sun, 28 Jan 2018 23:03:11 +0100 Subject: [PATCH] Add first version of a Makefile --- Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2074d0d --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +CXX=g++ +CXXFLAGS=-Wall -Wextra -O2 -std=c++14 +CXXLIBS= + +# In `TARGET`, list the names of the `main_[stuff].cpp` you'd like to compile +# into a `[stuff].bin`. +TARGETS= + +OBJS=Implicit.o \ + Mesh.o + +all: $(TARGETS:=.bin) + +%.bin: main_%.cpp $(OBJS) + $(CXX) $(CXXFLAGS) $(CXXLIBS) $(OBJS) $< -o $@ + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +############################################################ + +.PHONY: clean + +clean: + rm -rf $(OBJS)