-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 811 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 811 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
#################################################################################
#DEBUG = -g -O0
DEBUG = -O3
CC = gcc
INCLUDE = -I/usr/local/include
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
LDFLAGS = -L/usr/local/lib
LDLIBS = -lwiringPi -lcurl -lpthread -lm
SRC = pitempd.c test.c dht_logger.c
OBJ = $(SRC:.c=.o)
BINS = $(SRC:.c=)
prefix=/usr/local
all: $(BINS)
minini: minini/minIni.c
pitempd: minini
@$(CC) -o $@ pitempd.c minini/minIni.c $(LDFLAGS) $(LDLIBS)
logger:
@$(CC) -o $@ dht_logger.c $(LDFLAGS) $(LDLIBS)
test: minini
@$(CC) -o $@ test.c minini/minIni.c $(LDFLAGS) $(LDLIBS)
install: pitempd
install -C -g 0 -o 0 -m 0755 pitempd $(prefix)/sbin
install -C -g 0 -o 0 -m 0755 pitempd.monit /etc/monit/conf.d/pitempd
clean:
@echo "[Clean]"
@rm -f $(OBJ) *~ core tags $(BINS)