From 744aee1b47856bc8cf47951f7be328d76a2a4950 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 27 Mar 2010 21:59:32 -0400 Subject: [PATCH] simplifying makefile with implicit rule --- Makefile | 8 ++++++-- src/{hello_world.cpp => hello-world.cpp} | 0 2 files changed, 6 insertions(+), 2 deletions(-) rename src/{hello_world.cpp => hello-world.cpp} (100%) diff --git a/Makefile b/Makefile index db46cbe..e2af723 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,8 @@ +ALL_TARGETS = bin/hello-world -bin/hello-world: src/hello_world.cpp - g++ src/hello_world.cpp -o bin/hello-world +all: $(ALL_TARGETS) + + +bin/%: src/%.cpp + g++ $^ -o $@ diff --git a/src/hello_world.cpp b/src/hello-world.cpp similarity index 100% rename from src/hello_world.cpp rename to src/hello-world.cpp