aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-03-09 16:20:28 +0100
committerCharles <sircharlesaze@gmail.com>2020-03-09 16:20:28 +0100
commitddff2e34a8f5e7fdb4a9e67d4df1edfa393ab3b7 (patch)
tree0ef7eddfeadb0c7201bdc0fd3851350239229b06 /Makefile
parentc27e85f27b8db206da23b813358ea44e302f2419 (diff)
downloadcomputorv1-ddff2e34a8f5e7fdb4a9e67d4df1edfa393ab3b7.tar.gz
computorv1-ddff2e34a8f5e7fdb4a9e67d4df1edfa393ab3b7.tar.bz2
computorv1-ddff2e34a8f5e7fdb4a9e67d4df1edfa393ab3b7.zip
Refactoring file structure
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
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