From 559c58f0726b4e23ea65bb8ee9dc457b361fb5c0 Mon Sep 17 00:00:00 2001 From: Han Donghyeon <hando1220@ajou.ac.kr> Date: Wed, 4 Dec 2024 10:02:54 +0000 Subject: [PATCH] =?UTF-8?q?chore(c):=20Makefile=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- camera-node-control/Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 camera-node-control/Makefile diff --git a/camera-node-control/Makefile b/camera-node-control/Makefile new file mode 100644 index 0000000..a137ad1 --- /dev/null +++ b/camera-node-control/Makefile @@ -0,0 +1,24 @@ +CXX = g++ +CXXFLAGS = -Wall -std=c++17 `pkg-config --cflags libcamera opencv4` +LDFLAGS = `pkg-config --libs libcamera opencv4` + +SOURCES = camera.cpp gpio.cpp +OBJECTS = $(SOURCES:.cpp=.o) +TARGET = camera +DIRS = ../images ../plates + +.PHONY: all clean directories + +all: directories $(TARGET) + +directories: + @mkdir -p $(DIRS) + +$(TARGET): $(OBJECTS) + $(CXX) $(OBJECTS) -o $(TARGET) $(LDFLAGS) + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +clean: + rm -f $(OBJECTS) $(TARGET) \ No newline at end of file -- GitLab