Skip to content
Snippets Groups Projects
Commit 7998c196 authored by Leon Bohnwagner's avatar Leon Bohnwagner :crab:
Browse files

feat: add makefile and update systemd services

parent e59dc838
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,6 @@ CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
......
Makefile 0 → 100644
CMAKE_BUILD_DIR = build
BINARY_DIR = /usr/bin
SYSTEMD_DIR = /etc/systemd/system
DAEMON = daemon
CLIENTS = dummy cpu_temp
SYSTEM_NAME = sibyl
all: build install
build:
mkdir -p $(CMAKE_BUILD_DIR)
cd $(CMAKE_BUILD_DIR) && cmake ..
cd $(CMAKE_BUILD_DIR) && make
install:
install -m 755 $(CMAKE_BUILD_DIR)/$(DAEMON)/$(DAEMON) $(BINARY_DIR)/$(SYSTEM_NAME)-$(DAEMON)
$(foreach client, $(CLIENTS), install -m 755 $(CMAKE_BUILD_DIR)/clients/$(client)/$(client) $(BINARY_DIR)/$(SYSTEM_NAME)-$(subst _,-,$(client));)
install -m 644 systemd/$(SYSTEM_NAME)-$(DAEMON).service $(SYSTEMD_DIR)/$(SYSTEM_NAME)-$(DAEMON).service
$(foreach client, $(CLIENTS), install -m 644 systemd/clients/$(SYSTEM_NAME)-$(subst _,-,$(client)).service $(SYSTEMD_DIR)/$(SYSTEM_NAME)-$(subst _,-,$(client)).service;)
uninstall:
rm -f $(BINARY_DIR)/$(SYSTEM_NAME)-$(DAEMON)
$(foreach client, $(CLIENTS), rm -f $(BINARY_DIR)/$(SYSTEM_NAME)-$(subst _,-,$(client));)
rm -f $(SYSTEMD_DIR)/$(SYSTEM_NAME)-$(DAEMON).service
$(foreach client, $(CLIENTS), rm -f $(SYSTEMD_DIR)/$(SYSTEM_NAME)-$(subst _,-,$(client)).service;)
clean:
rm -rf $(CMAKE_BUILD_DIR)
# Embedded Linux Project (sibyl)
# Embedded Linux Project (Sibyl)
## Building
......
[Unit]
Description=Dummy
After=daemon.service
Description=Sibyl Client CPU Temperature
Wants=sibyl-daemon.service
After=sibyl-daemon.service
[Service]
ExecStart=/usr/bin/dummy 1 250
ExecStart=/usr/bin/sibyl-cpu-temp 2 250
Restart=always
[Install]
......
[Unit]
Description=CPU Temp
After=daemon.service
Description=Sibyl Client Dummy
Wants=sibyl-daemon.service
After=sibyl-daemon.service
[Service]
ExecStart=/usr/bin/cpu-temp 2 250
ExecStart=/usr/bin/sibyl-dummy 1 250
Restart=always
[Install]
......
[Unit]
Description=Daemon
Description=Sibyl Daemon
After=network.target
[Service]
ExecStart=/usr/bin/daemon
ExecStart=/usr/bin/sibyl-daemon
Restart=always
[Install]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment