Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 30s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 29s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 30s
22 lines
403 B
Makefile
22 lines
403 B
Makefile
CXX = g++
|
|
CFLAGS = -Wall -g -std=c++20
|
|
LDFLAGS =
|
|
LIBS =
|
|
INCLUDES = -I./src/libs -I./src
|
|
SRCS = $(shell find src -type f -name '*.cpp')
|
|
OBJS = $(SRCS:.cpp=.o)
|
|
TARGET = openrouter
|
|
BUILD_DIR=./build
|
|
CROSS_COMPILE =
|
|
|
|
all: $(TARGET)
|
|
|
|
$(TARGET): $(OBJS)
|
|
$(CROSS_COMPILE)$(CXX) $(LDFLAGS) $^ -o $@ $(LIBS)
|
|
|
|
%.o: %.cpp
|
|
$(CROSS_COMPILE)$(CXX) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
|
|
|
clean:
|
|
rm -f $(OBJS) $(TARGET)
|