Files
openrouter/Makefile
T
wt 0e489c1304
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 18m44s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 7m11s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 8m20s
added install in Makefile
2025-01-19 20:45:32 +07:00

35 lines
1.4 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/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=bin/openrouter
default: all
all: build
build:
@if [ ! -d bin ]; then \
mkdir bin; \
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