From ddff2e34a8f5e7fdb4a9e67d4df1edfa393ab3b7 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 9 Mar 2020 16:20:28 +0100 Subject: Refactoring file structure --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 48f7007..347c7f1 100644 --- a/Makefile +++ b/Makefile @@ -12,19 +12,21 @@ CC = ghc +SRC_DIR = src +BUILD_DIR = build NAME = computor -SRC = $(shell find . -name "*.hs") +SRC = $(shell find $(SRC_DIR) -type f -name "*.hs") all: $(NAME) $(NAME): $(SRC) - $(CC) -o $(NAME) $(SRC) + $(CC) --make -outputdir $(BUILD_DIR) -o $(NAME) $(SRC) clean: - rm -f *.o *.hi + $(RM) $(BUILD_DIR)/*.o $(BUILD_DIR)/*.hi fclean: clean - rm -f $(NAME) + $(RM) $(NAME) re: fclean all -- cgit