Skip to content
Snippets Groups Projects
Commit 49aa2e7a authored by 최 민서's avatar 최 민서
Browse files

chore: Makefile 추가

parent bf9e68e4
No related branches found
No related tags found
No related merge requests found
Makefile 0 → 100644
# 컴파일러 및 플래그 설정
CXX = g++
CXXFLAGS = -std=c++17 -I src -I src/RPi-Arduino-SPI
LDFLAGS = -lbcm2835 -lpthread
# 실행 파일 이름
TARGET = charger
# 소스 파일 및 오브젝트 파일 정의
SRC_DIR = src
ROOT_SRC = charger.cpp
SRCS = $(ROOT_SRC) $(wildcard $(SRC_DIR)/**/*.cpp $(SRC_DIR)/*.cpp)
OBJS = $(SRCS:.cpp=.o)
# 빌드 규칙
all: $(TARGET)
$(TARGET): $(OBJS)
$(CXX) $(OBJS) -o $@ $(LDFLAGS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
# 파일 정리
clean:
rm -f $(OBJS) $(TARGET)
.PHONY: all clean
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment