-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
49 lines (36 loc) · 1.47 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
lvcl_PID := $(shell pgrep lvcl)
#ifeq ($(lvcl_PID),)
# killCommand := $(kill -6 $(lvcl_PID))
#endif
CC=gccgo
CFLAGS=-Wall -Wextra -Wpedantic -march=skylake -static -g1
LDFLAGS= -static
SOURCES=$(wildcard *.go )
OBJECTS=$(SOURCES:.go=.o)
EXECUTABLE=lvcl
build:
go build
push:
git push home master
git push github master
servers_boot:
ipmitool -v -I lanplus -H r210II-1.idrac -U root -P $(pass homelab/r210II-1-6g) -y $(cat ~/.ssh/ipmikey) power on
ipmitool -v -I lanplus -H r210II-2.idrac -U root -P $(pass homelab/r210II-2-fb) -y $(cat ~/.ssh/ipmikey) power on
ipmitool -v -I lanplus -H r210II-3.idrac -U root -P $(pass homelab/r210II-3-91) -y $(cat ~/.ssh/ipmikey) power on
servers_shutdown:
ipmitool -v -I lanplus -H r210II-1.idrac -U root -P $(pass homelab/r210II-1-6g) -y $(cat ~/.ssh/ipmikey) power soft
ipmitool -v -I lanplus -H r210II-2.idrac -U root -P $(pass homelab/r210II-2-fb) -y $(cat ~/.ssh/ipmikey) power soft
ipmitool -v -I lanplus -H r210II-3.idrac -U root -P $(pass homelab/r210II-3-91) -y $(cat ~/.ssh/ipmikey) power soft
wc:
./wc.sh
client-test:
for x in {1..10}; do ./lvcl-client -socket lvcl.sock -r -res 'basicResource 1' -state on; sleep 1 ; ./lvcl-client -socket lvcl.sock -r -res 'basicResource 1' -state off; sleep 1; done ; killall -s 6 lvcl
debugKill:
#kill -6 $(lvcl_PID)
killall -s 6 lvcl
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $(EXECUTABLE)
$(OBJECTS): $(SOURCES)
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(EXECUTABLE) $(OBJECTS)