-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 855 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 855 Bytes
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
CC = g++
OUT_DIR = build
CFLAGS = -c -Wall -Werror -Wpedantic -Wunreachable-code -Wextra -g -std=c++17 -O2
TFLAGS = -D TEST
INC = -I includes
.PHONY: test clean
all : algo
algo : main.o Rectangle.o lib.o RectangleSet.o stripes.o # Add other .o files here
$(CC) main.o Rectangle.o lib.o RectangleSet.o stripes.o -o algo
@mkdir -p $(OUT_DIR)
@mv *.o $(OUT_DIR)
@mv algo $(OUT_DIR)
main.o : src/main.cpp
$(CC) $(CFLAGS) src/main.cpp $(OUTPUT) $(INC)
Rectangle.o : src/Rectangle.cpp
$(CC) $(CFLAGS) src/Rectangle.cpp $(OUTPUT) $(INC)
RectangleSet.o : src/RectangleSet.cpp
$(CC) $(CFLAGS) src/RectangleSet.cpp $(OUTPUT) $(INC)
stripes.o : src/stripes.cpp
$(CC) $(CFLAGS) src/stripes.cpp $(OUTPUT) $(INC)
lib.o : src/lib.cpp
$(CC) $(CFLAGS) src/lib.cpp $(OUTPUT) $(INC)
test:
./scripts/test
clean :
rm -rf $(OUT_DIR)