Browse Source

Fix: Allow for building examples individually
You don't necessarily want to build all of them. Now you can do, e.g.:
make examples/minimal

Alex Dewar 5 years ago
parent
commit
6ec72daa6b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Makefile

+ 3 - 0
Makefile

@@ -21,5 +21,8 @@ EXECUTABLES := $(foreach exec,$(basename $(SOURCES)),$(exec))
 
 examples: $(EXECUTABLES)
 
+$(EXECUTABLES): %: %.cpp
+	$(CXX) -o $@ $< $(CXXFLAGS) $(LDFLAGS)
+
 clean:
 	rm -f ${EXECUTABLES}