-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (44 loc) · 1.18 KB
/
Makefile
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
56
57
58
59
60
61
62
63
64
NAME = tetris
CC = gcc -I includes
OFILES = ./place_piece.o ./is_safe.o ./valid_box.o ./valid_file.o ./main.o ./make_3d_boxes.o \
./2d_to_1d.o ./make_2d_box.o ./file_reader.o ./solver.o ./make_board.o \
./copy_board.o
all: $(NAME)
$(NAME): $(OFILES)
rm -rf bin
mkdir bin
$(CC) -o $(NAME) $(OFILES)
mv *.o bin
./place_piece.o: ./srcs/place_piece.c
$(CC) -c ./srcs/place_piece.c
./is_safe.o: ./srcs/is_safe.c
$(CC) -c ./srcs/is_safe.c
./valid_box.o: ./srcs/valid_box.c
$(CC) -c ./srcs/valid_box.c
./valid_file.o: ./srcs/valid_file.c
$(CC) -c ./srcs/valid_file.c
./main.o: ./srcs/main.c
$(CC) -c ./srcs/main.c
./make_3d_boxes.o: ./srcs/make_3d_boxes.c
$(CC) -c ./srcs/make_3d_boxes.c
./2d_to_1d.o: ./srcs/2d_to_1d.c
$(CC) -c ./srcs/2d_to_1d.c
./make_2d_box.o: ./srcs/make_2d_box.c
$(CC) -c ./srcs/make_2d_box.c
./file_reader.o: ./srcs/file_reader.c
$(CC) -c ./srcs/file_reader.c
./solver.o: ./srcs/solver.c
$(CC) -c ./srcs/solver.c
./make_board.o: ./srcs/make_board.c
$(CC) -c ./srcs/make_board.c
./copy_board.o: ./srcs/copy_board.c
$(CC) -c ./srcs/copy_board.c
clean:
rm -rf ./bin
fclean: clean
rm tetris
rm tetriminos_file
re: fclean
make all
bin: re
make clean