aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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