-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile
executable file
·62 lines (51 loc) · 2.07 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright (C) 2021 rdwn
#
# This file is part of Clocker.
#
# Clocker 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.
#
# Clocker 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 Clocker. If not, see <http://www.gnu.org/licenses/>.
current = $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
component := ${current}/source/listener.c
component += ${current}/source/time_handler.c
component += ${current}/source/timer.c
component += ${current}/source/update_checker.c
component += ${current}/source/sig_handler.c
component += ${current}/source/cmd.c
component += ${current}/source/data_manager.c
component += ${current}/framework/system/thread/guarded.c
component += ${current}/framework/system/thread/thread.c
component += ${current}/framework/system/fs/wrapper.c
component += ${current}/framework/system/memory/boxed.c
updaterComponent := ${current}/source/update_checker.c
updaterComponent += ${current}/framework/system/memory/boxed.c
header := ${current}
clocker := ${current}/deploy/clocker/clocker.c
updater := ${current}/deploy/updater/updater.c
buildClocker := ${current}/build/clocker
buildUpdater := ${current}/build/clocker-updater
all:
@mkdir -p ${current}/build/
@gcc -I${header} -fcompare-debug-second -w -g ${component} ${clocker} -o ${buildClocker} -lpthread
@gcc -I${header} -fcompare-debug-second -w -g ${updater} ${updaterComponent} -o ${buildUpdater} -lpthread
install:
@mkdir -p /root/.config/clocker
@cp ${buildClocker} /usr/bin
@cp ${buildUpdater} /usr/bin
run:
@sudo ${buildClocker}
clean:
@rm -rf ${current}/build/
uninstall:
@rm -rf /root/.config/clocker
@rm /usr/bin/clocker
@rm /usr/bin/clocker-updater