-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 709 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (28 loc) · 709 Bytes
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
35
36
37
38
#Makefile for picfan
CC=gcc
CFLAGS=-I.
DEPS =
LIBS = -lbcm2835 -lpthread
BINDIR = /usr/local/bin/
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
all: picfan
picfan: picfan.o bcm2835
$(CC) -o picfan picfan.o $(LIBS)
.PHONY: bcm2835-force clean all install install-picfan
bcm2835-force:
bash ./inst-bcm2835.sh
bcm2835: /usr/local/lib/libbcm2835.a
/usr/local/lib/libbcm2835.a:
bash ./inst-bcm2835.sh
clean:
rm -f *.o
rm picfan
rm -rf bcm2835
install-picfan:
install -m 500 -o root -g bin picfan $(BINDIR)
install:
install -m 500 -o root -g bin picfan $(BINDIR)
install -m 444 -o root -g root picfan.service /lib/systemd/system/
systemctl enable picfan.service
systemctl start picfan.service