-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (32 loc) · 893 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Define the compiler and flags
CXX = g++
CXXFLAGS = $(shell pkg-config --cflags opencv4)
CXXFLAGS += --std=c++17 -g -Wall -Werror -pedantic
LDFLAGS += $(shell pkg-config --libs opencv4)
# Default target to build the executable
all: a_star
# Rule to link the executable
a_star: a_star.cpp
$(CXX) $(CXXFLAGS) a_star.cpp -o $@ $(LDFLAGS)
# Clean up build artifacts
clean:
rm -f a_star.exe
# # Compiler
# CXX = g++
# # Compiler flags
# CXXFLAGS = -I/usr/include/opencv4 -I/usr/include -g
# # Linker flags
# LDFLAGS = -L/usr/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs
# # Target executable
# TARGET = a_star
# # Source files
# SOURCES = a_star.cpp
# # Object files
# OBJECTS = $(SOURCES:.cpp=.o)
# all: $(TARGET)
# $(TARGET): $(OBJECTS)
# $(CXX) -o $@ $^ $(LDFLAGS)
# %.o: %.cpp
# $(CXX) -c $< -o $@ $(CXXFLAGS)
# clean:
# rm -f $(TARGET) $(OBJECTS)