aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 347c7f105f8bed62844e7b21a37a17eeb186dc82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# **************************************************************************** #
#                                                                              #
#                                                         :::      ::::::::    #
#    Makefile                                           :+:      :+:    :+:    #
#                                                     +:+ +:+         +:+      #
#    By: cacharle <marvin@42.fr>                    +#+  +:+       +#+         #
#                                                 +#+#+#+#+#+   +#+            #
#    Created: 2020/02/29 11:54:31 by cacharle          #+#    #+#              #
#    Updated: 2020/02/29 12:01:42 by cacharle         ###   ########.fr        #
#                                                                              #
# **************************************************************************** #

CC = ghc

SRC_DIR = src
BUILD_DIR = build
NAME = computor

SRC = $(shell find $(SRC_DIR) -type f -name "*.hs")

all: $(NAME)

$(NAME): $(SRC)
	$(CC) --make -outputdir $(BUILD_DIR) -o $(NAME) $(SRC)

clean:
	$(RM) $(BUILD_DIR)/*.o $(BUILD_DIR)/*.hi

fclean: clean
	$(RM) $(NAME)

re: fclean all