-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
45 lines (34 loc) · 1.77 KB
/
Copy pathmakefile
File metadata and controls
45 lines (34 loc) · 1.77 KB
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
39
40
41
42
#*************************************************************************
#** Copyright (C) 2022 Jan Pedersen <jp@jp-embedded.com>
#**
#** This file is part of tesla-cron.
#**
#** tesla-cron is free software: you can redistribute it and/or modify
#** it under the terms of the GNU General Public License as published by
#** the Free Software Foundation, either version 3 of the License, or
#** (at your option) any later version.
#**
#** tesla-cron is distributed in the hope that it will be useful,
#** but WITHOUT ANY WARRANTY; without even the implied warranty of
#** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#** GNU General Public License for more details.
#**
#** You should have received a copy of the GNU General Public License
#** along with tesla-cron. If not, see <https://www.gnu.org/licenses/>.
#*************************************************************************/
OBJS := tesla_cron.o graph.o location.o icalendarlib/date.o icalendarlib/icalendar.o icalendarlib/types.o date/src/tz.o ReverseGeocode.o elnet-forsyningsgraenser-022020.o tesla-api.o
CPPFLAGS := -Wall -Wpedantic -MD -MP -O2
CPPFLAGS += $(shell python3-config --includes)
CPPFLAGS += -I date/include/
CXXFLAGS := -std=c++17 -ggdb
all: tesla_cron
tesla_cron: $(OBJS)
$(CXX) -o $@ $^ -lcurl -lcurlpp -lboost_python3$(shell python3-config --includes | cut -d' ' -f1 | cut -d'.' -f 2) -lrrd $(shell python3-config --ldflags --embed)
install:
install tesla_cron /usr/local/bin/
echo "1 * * * * root su -l -c /usr/local/bin/tesla_cron >> /var/log/tesla_cron.log" > /etc/cron.d/tesla_cron
clean:
rm -f $(OBJS) $(OBJS:.o=.d) tesla_cron elnet-forsyningsgraenser-022020.cpp
elnet-forsyningsgraenser-022020.cpp: elnet-forsyningsgraenser-022020.json
xxd -i $< > $@
-include $(OBJS:.o=.d)