diff --git a/Makefile b/Makefile index 225ae01..a8becc4 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,5 @@ -all: hello +SRC_DIR = src -hello: hello.o - gcc -o $@ $< - -%.o: %.c - gcc -Wall -c $< - -clean: - -rm -f hello.o hello - -test: hello - ./$< - -.PHONY: all clean test +all: +%: + make -C $(SRC_DIR) $@ diff --git a/.gitignore b/src/.gitignore similarity index 100% rename from .gitignore rename to src/.gitignore diff --git a/Makefile b/src/Makefile similarity index 100% copy from Makefile copy to src/Makefile diff --git a/hello.c b/src/hello.c similarity index 100% rename from hello.c rename to src/hello.c