-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
34 lines (34 loc) · 860 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#/*
# * BSD 3-Clause License
# * Copyright (c) 2018, Igor Muravyov
# * All rights reserved.
# */
CC ?= cc
SBC ?= RPI_V3
all:
$(CC) -I ./ -O2 -Wall -D $(SBC) -g -o cooldown main.c \
periph.c -static
run:
sudo ./cooldown
clean:
rm cooldown
install: cooldown
# RUN THIS AS ROOT
@# Make all dirs needed:
mkdir -p /etc/cooldown/
cp cooldown /usr/bin/
cp config /etc/cooldown
install_systemd: install
cp cooldown.service /etc/systemd/system/
systemctl enable cooldown
help:
@printf "\033[32msuitable SBC names:\033[0m\n"
@printf "RPI_V1\n"
@printf "RPI_V2\n"
@printf "RPI_V3\n"
@printf "RPI_V4\n"
@printf "supported targets:\n"
@printf "\033[32mall\033[0m: compile all\n"
@printf "\033[32minstall\033[0m: compile all\n"
@printf "\033[32minstall_systemd\033[0m: install service files\n"
@printf "\033[32mrun\033[0m: run from current folder\n"