aboutsummaryrefslogtreecommitdiff
path: root/bsq/Makefile
blob: 106b4d5dff8a40e5ad2c9792322bcf5c64ada0db (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# **************************************************************************** #
#                                                                              #
#                                                         :::      ::::::::    #
#    Makefile                                           :+:      :+:    :+:    #
#                                                     +:+ +:+         +:+      #
#    By: cacharle <charles.cabergs@gmail.com>       +#+  +:+       +#+         #
#                                                 +#+#+#+#+#+   +#+            #
#    Created: 2019/07/19 12:09:54 by cacharle          #+#    #+#              #
#    Updated: 2019/07/24 17:47:26 by cacharle         ###   ########.fr        #
#                                                                              #
# **************************************************************************** #

NAME = bsq
SRC = main.c algo.c helper.c terrain.c parse.c parse_helper.c utils.c
OBJ = $(SRC:.c=.o)
INCLUDES = include.h

CC = cc
CCFLAGS = -Wall -Wextra -Werror

ARGS = 10 10 2

.PHONY: all
all: $(NAME)

$(NAME): $(OBJ)
	$(CC) $(CCFLAGS) -o $@ $^

%.o: %.c $(INCLUDES)
	$(CC) $(CCFLAGS) -c -o $@ $<

.PHONY: clean
clean:
	rm -f $(OBJ)

.PHONY: fclean
fclean: clean
	rm -f $(NAME)

.PHONY: re
re: fclean all

.PHONY: generate
generate:
	@./tests/generate.pl ${ARGS}

.PHONY: test
test: all
	@./tests/generate.pl ${ARGS} > ./tests/boardtest
	@./$(NAME) ./tests/boardtest

.PHONY: flex
flex:
	@./tests/generate.pl 360 80 100000 > tests/printable
	@./bsq ./tests/printable