-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (19 loc) · 769 Bytes
/
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
CC=g++
CFLAGS= -std=gnu++11 -O2 -Iinclude -I/usr/include/python3.10
LDFLAGS= -lpython3.10
DEBUG=-g
SRC_DIR=src
INCLUDE_DIR=include
BIN_DIR=bin
OUTPUT_DIR=output
all: $(BIN_DIR) main
main: $(BIN_DIR)/Convolution.o $(BIN_DIR)/Filter.o $(SRC_DIR)/main.cpp
$(CC) $(CFLAGS) $(SRC_DIR)/main.cpp $(BIN_DIR)/Convolution.o $(BIN_DIR)/Filter.o -o $(OUTPUT_DIR)/main $(LDFLAGS)
$(BIN_DIR)/Convolution.o: $(SRC_DIR)/Convolution.cpp $(INCLUDE_DIR)/Convolution.hpp $(BIN_DIR)/Filter.o
$(CC) $(CFLAGS) -c $(SRC_DIR)/Convolution.cpp -o $(BIN_DIR)/Convolution.o
$(BIN_DIR)/Filter.o: $(SRC_DIR)/Filter.cpp $(INCLUDE_DIR)/Filter.hpp
$(CC) $(CFLAGS) -c $(SRC_DIR)/Filter.cpp -o $(BIN_DIR)/Filter.o
$(BIN_DIR):
mkdir -p $(BIN_DIR)
clean:
rm -rf $(BIN_DIR) $(OUTPUT_DIR)/main