aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 192573b8a4d1407184b82979fffc93960ae85b7e (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
33
34
35
# **************************************************************************** #
#                                                                              #
#                                                         :::      ::::::::    #
#    Makefile                                           :+:      :+:    :+:    #
#                                                     +:+ +:+         +:+      #
#    By: cacharle <marvin@42.fr>                    +#+  +:+       +#+         #
#                                                 +#+#+#+#+#+   +#+            #
#    Created: 2020/02/29 11:54:31 by cacharle          #+#    #+#              #
#    Updated: 2020/06/05 16:30:53 by charles          ###   ########.fr        #
#                                                                              #
# **************************************************************************** #

GHC = ghc
RM = rm -f

GHCFLAGS = -dynamic --make -Wall -Wno-orphans

SRC_DIR = src
OBJ_DIR = build
NAME = computorv2

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

all: $(NAME)

$(NAME): $(SRC)
	$(GHC) $(GHCFLAGS) -outputdir $(OBJ_DIR) -o $(NAME) $(SRC)

clean:
	$(RM) -r $(OBJ_DIR)

fclean: clean
	$(RM) $(NAME)

re: fclean all