forked from OpenHR20/OpenHR20
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
148 lines (123 loc) · 3.86 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#############
# Thermostat settings
# Uncomment to enable slave programming also via buttons/wheel
#export REMOTE_SETTING_ONLY=0
# Switch to 1 to enable slave motor startup battery compensation
export MOTOR_COMPENSATE_BATTERY=0
#############
# Master settings
# Set the proper master type
#MASTERTYPE=JEENODE=1
#MASTERTYPE=NANODE=1
#############
# RFM settings
# Enable diagnostic to fine tune RFM frequency by default
export RFM_TUNING=1
# Set default HR slave address, valid range is 1-28
export RFM_DEVICE_ADDRESS=28
# Set default security keys, shared by master and slave
export SECURITY_KEY_0=0x01
export SECURITY_KEY_1=0x23
export SECURITY_KEY_2=0x45
export SECURITY_KEY_3=0x67
export SECURITY_KEY_4=0x89
export SECURITY_KEY_5=0x01
export SECURITY_KEY_6=0x23
export SECURITY_KEY_7=0x45
# Main RFM frequency (depends on RFM variant)
export RFM_FREQ_MAIN=868
# Decimal part of the RFM frequency
export RFM_FREQ_FINE=0.35
#############
default: HR20_rfm_int_sww rfm_master
all: HR20_rfm_int_sww HR20_rfm_int_hww HR20_rfm_ext_sww HR20_original_sww HR20_original_hww HR25_original_sww HR25_rfm_int_sww thermotronic_sww rfm_master
cp src/license.txt $(DEST)/
clean:
$(MAKE) clean -C src TARGET=../$(DEST)/HR20_rfm_int_sww/hr20 OBJDIR=HR20_rfm_int_sww
$(MAKE) clean -C src TARGET=../$(DEST)/HR20_rfm_int_hww/hr20 OBJDIR=HR20_rfm_int_hww
$(MAKE) clean -C src TARGET=../$(DEST)/HR20_rfm_ext_sww/hr20 OBJDIR=HR20_rfm_ext_sww
$(MAKE) clean -C src TARGET=../$(DEST)/HR20_original_sww/hr20 OBJDIR=HR20_original_sww
$(MAKE) clean -C src TARGET=../$(DEST)/HR20_original_hww/hr20 OBJDIR=HR20_original_hww
$(MAKE) clean -C src TARGET=../$(DEST)/HR25_original_sww/hr20 OBJDIR=HR25_original_sww
$(MAKE) clean -C src TARGET=../$(DEST)/HR25_rfm_int_sww/hr20 OBJDIR=HR25_rfm_int_sww
$(MAKE) clean -C src TARGET=../$(DEST)/thermotronic_sww/hr20 OBJDIR=thermotronic_sww
$(MAKE) clean -C rfm-master TARGET=../$(DEST)/rfm_master/rfm_master OBJDIR=rfm_master
@rm -f $(DEST)/license.txt
beauty:
uncrustify rfm-master/*.h rfm-master/*.c src/*.h src/*.c common/*.h common/*.c -c uncrustify.conf --replace --no-backup
check:
cppcheck --inline-suppr --force . >/dev/null
VER=
DEST=bin
HR20_rfm_int_sww:
$(shell mkdir $(DEST)/$@ 2>/dev/null)
$(MAKE) -C src \
TARGET=../$(DEST)/$@/hr20 \
OBJDIR=$@ \
HW_WINDOW_DETECTION=0 \
REV=-DREVISION=\\\"$(REV)\\\"
HR20_rfm_int_hww:
$(shell mkdir $(DEST)/$@ 2>/dev/null)
$(MAKE) -C src \
TARGET=../$(DEST)/$@/hr20 \
OBJDIR=$@ \
HW_WINDOW_DETECTION=1 \
REV=-DREVISION=\\\"$(REV)\\\"
HR20_rfm_ext_sww:
$(shell mkdir $(DEST)/$@ 2>/dev/null)
$(MAKE) -C src \
TARGET=../$(DEST)/$@/hr20 \
OBJDIR=$@ \
HW_WINDOW_DETECTION=0\
RFM_WIRE=MARIOJTAG \
REV=-DREVISION=\\\"$(REV)\\\"
HR20_original_sww:
$(shell mkdir $(DEST)/$@ 2>/dev/null)
$(MAKE) -C src \
TARGET=../$(DEST)/$@/hr20 \
OBJDIR=$@ \
HW_WINDOW_DETECTION=0 \
RFM=0 \
REV=-DREVISION=\\\"$(REV)\\\"
HR20_original_hww:
$(shell mkdir $(DEST)/$@ 2>/dev/null)
$(MAKE) -C src \
TARGET=../$(DEST)/$@/hr20 \
OBJDIR=$@ \
HW_WINDOW_DETECTION=1 \
RFM=0 \
REV=-DREVISION=\\\"$(REV)\\\"
HR25_original_sww:
$(shell mkdir $(DEST)/$@ 2>/dev/null)
$(MAKE) -C src \
TARGET=../$(DEST)/$@/hr20 \
OBJDIR=$@ \
HW_WINDOW_DETECTION=0 \
RFM=0 \
HW=HR25 \
REV=-DREVISION=\\\"$(REV)\\\"
HR25_rfm_int_sww:
$(shell mkdir $(DEST)/$@ 2>/dev/null)
$(MAKE) -C src \
TARGET=../$(DEST)/$@/hr20 \
OBJDIR=$@ \
HW_WINDOW_DETECTION=0 \
RFM_WIRE=TK_INTERNAL \
HW=HR25 \
REV=-DREVISION=\\\"$(REV)\\\"
thermotronic_sww:
$(shell mkdir $(DEST)/$@ 2>/dev/null)
$(MAKE) -C src \
TARGET=../$(DEST)/$@/hr20 \
OBJDIR=$@ \
HW_WINDOW_DETECTION=0 \
RFM=0 \
HW=THERMOTRONIC \
REV=-DREVISION=\\\"$(REV)\\\"
rfm_master:
$(shell mkdir $(DEST)/$@ 2>/dev/null)
$(MAKE) -C rfm-master \
TARGET=../$(DEST)/$@/rfm_master \
OBJDIR=$@ \
${MASTERTYPE} \
REV=-DREVISION=\\\"$(REV)\\\"