Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Has been cancelled
62 lines
1.5 KiB
Makefile
62 lines
1.5 KiB
Makefile
CXX=g++
|
|
STRIP=strip
|
|
CXXFLAGS=-Wall -I src/libs -I src -std=c++20
|
|
SOURCES=src/openrouter.cpp \
|
|
src/security/cors.cpp \
|
|
src/settings/settings.cpp \
|
|
src/settings/backup.cpp \
|
|
src/settings/telnet/enabled.cpp \
|
|
src/settings/telnet/port.cpp \
|
|
src/settings/ssh/status.cpp \
|
|
src/settings/ssh/keys.cpp \
|
|
src/settings/ssh/port.cpp \
|
|
src/settings/ssh/server.cpp \
|
|
src/settings/dns/enabled.cpp \
|
|
src/settings/dns/servers.cpp \
|
|
src/settings/dns/local_domains.cpp \
|
|
src/settings/wifi/status.cpp \
|
|
src/settings/wifi/name.cpp \
|
|
src/settings/wifi/password.cpp \
|
|
src/settings/wifi/qr.cpp \
|
|
src/settings/wifi/channel.cpp \
|
|
src/settings/ftp/ftp.cpp \
|
|
src/system/reboot/reboot.cpp \
|
|
src/system/syslog/syslog.cpp \
|
|
src/system/uptime/uptime.cpp \
|
|
src/OpenRouter/OpenRouter.cpp \
|
|
src/auth/auth.cpp \
|
|
src/libs/QR-Code-generator/qrcodegen.cpp \
|
|
src/libs/QR-Code-generator/qrtosvg.cpp
|
|
TARGET=build/openrouter
|
|
default: all
|
|
all: build
|
|
.PHONY: build
|
|
build:
|
|
@if [ ! -d build ]; then \
|
|
mkdir build; \
|
|
fi
|
|
$(CXX) -o $(TARGET) $(SOURCES) $(CXXFLAGS)
|
|
$(STRIP) $(TARGET)
|
|
clean:
|
|
@if [ -f $(TARGET) ]; then \
|
|
rm -v $(TARGET); \
|
|
fi
|
|
|
|
install:
|
|
@if [ ! -f /usr/bin/openrouter ]; then \
|
|
install -v $(TARGET) /usr/bin/openrouter; \
|
|
fi
|
|
# install -d /usr/share/openrouter
|
|
@if [ ! -d /usr/share/openrouter ]; then \
|
|
install -dv src/web /usr/share/openrouter/web; \
|
|
cp -rv src/web/* /usr/share/openrouter/web; \
|
|
fi
|
|
|
|
uninstall:
|
|
@if [ -d /usr/share/openrouter ]; then \
|
|
rm -rv /usr/share/openrouter; \
|
|
fi
|
|
@if [ -f /usr/bin/openrouter ]; then \
|
|
rm -v /usr/bin/openrouter; \
|
|
fi
|