-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathMakefile.mac
249 lines (223 loc) · 4.71 KB
/
Makefile.mac
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# Get git commit version and date
#GIT_VERSION := $(shell git --no-pager describe --tags --always --dirty)
GIT_DATE := $(firstword $(shell git --no-pager show --date=short --format="%ai" --name-only))
GIT_VERSION := $(shell git describe --abbrev=0 --tags)
CC?=gcc
LINK?=gcc
GTKINCLUDES=`pkg-config --cflags gtk+-3.0`
GTKLIBS=`pkg-config --libs gtk+-3.0`
#OPENGL_OPTIONS=-D OPENGL
#OPENGL_INCLUDES=`pkg-config --cflags epoxy`
#OPENGL_LIBS=`pkg-config --libs epoxy`
#PULSEINCLUDES=`pkg-config --cflags libpulse`
#PULSELIBS=`pkg-config --libs libpulse`
#PULSESIMPLELIBS=`pkg-config --libs libpulse-simple`
#PULSEMAINLOOPLIBS=`pkg-config --libs libpulse-mainloop-glib`
#AUDIO_LIBS=-lpulse-simple -lpulse -lpulse-mainloop-glib
AUDIOLIBS=-lsoundio
# uncomment the line below to include MIDI support
MIDI_INCLUDE=MIDI
ifeq ($(MIDI_INCLUDE),MIDI)
MIDI_OPTIONS=-D MIDI
MIDI_SOURCES= mac_midi.c midi2.c midi3.c midi_dialog.c
MIDI_HEADERS= midi.h midi_dialog.h
MIDI_OBJS= mac_midi.o midi2.o midi3.o midi_dialog.o
MIDI_LIBS= -framework CoreMIDI -framework Foundation
endif
# uncomment the line below to include SoapySDR support
#
# Note: SoapySDR support has only been tested with the RTL-SDR and LimeSDR
# No TX support yet.
#
# If you want to build with SoapySDR support you will need to install:
#
# sudo apt-get install libsoapysdr-dev
# sudo apt-get install soapysdr-module-rtlsdr
# sudo apt-get install soapysdr-module-lms7
#
#SOAPYSDR_INCLUDE=SOAPYSDR
ifeq ($(SOAPYSDR_INCLUDE),SOAPYSDR)
SOAPYSDR_OPTIONS=-D SOAPYSDR
SOAPYSDR_LIBS=-lSoapySDR
SOAPYSDR_SOURCES= \
soapy_discovery.c \
soapy_protocol.c
SOAPYSDR_HEADERS= \
soapy_discovery.h \
soapy_protocol.h
SOAPYSDR_OBJS= \
soapy_discovery.o \
soapy_protocol.o
endif
OPTIONS=-Wno-deprecated-declarations -D SOUNDIO -D GIT_DATE='"$(GIT_DATE)"' -D GIT_VERSION='"$(GIT_VERSION)"' $(MIDI_OPTIONS) $(SOAPYSDR_OPTIONS) $(OPENGL_OPTIONS) -O3 -g
LIBS=-lm -lpthread -lwdsp $(MIDI_LIBS)
INCLUDES=$(GTKINCLUDES) $(PULSEINCLUDES) $(OPENGL_INCLUDES)
COMPILE=$(CC) $(OPTIONS) $(MIDI_OPTIONS) $(INCLUDES)
PROGRAM=linhpsdr
SOURCES=\
main.c\
audio.c\
version.c\
discovered.c\
discovery.c\
protocol1_discovery.c\
protocol2_discovery.c\
property.c\
mode.c\
filter.c\
band.c\
radio.c\
receiver.c\
transmitter.c\
vfo.c\
meter.c\
rx_panadapter.c\
tx_panadapter.c\
mic_level.c\
mic_gain.c\
drive_level.c\
waterfall.c\
wideband_panadapter.c\
wideband_waterfall.c\
protocol1.c\
protocol2.c\
radio_dialog.c\
receiver_dialog.c\
transmitter_dialog.c\
pa_dialog.c\
eer_dialog.c\
wideband_dialog.c\
about_dialog.c\
button_text.c\
wideband.c\
vox.c\
ext.c\
configure_dialog.c\
bookmark_dialog.c\
puresignal_dialog.c\
oc_dialog.c\
xvtr_dialog.c\
frequency.c\
rigctl.c\
error_handler.c\
radio_info.c\
bpsk.c \
css.c \
subrx.c
HEADERS=\
main.h\
audio.h\
version.h\
discovered.h\
discovery.h\
protocol1_discovery.h\
protocol2_discovery.h\
property.h\
agc.h\
mode.h\
filter.h\
band.h\
radio.h\
receiver.h\
transmitter.h\
vfo.h\
meter.h\
rx_panadapter.h\
tx_panadapter.h\
mic_level.h\
mic_gain.h\
drive_level.h\
wideband_panadapter.h\
wideband_waterfall.h\
waterfall.h\
protocol1.h\
protocol2.h\
radio_dialog.h\
receiver_dialog.h\
transmitter_dialog.h\
pa_dialog.h\
eer_dialog.h\
wideband_dialog.h\
about_dialog.h\
button_text.h\
wideband.h\
vox.h\
ext.h\
configure_dialog.h\
bookmark_dialog.h\
puresignal_dialog.h\
oc_dialog.h\
xvtr_dialog.h\
frequency.h\
rigctl.h\
error_handler.h\
radio_info.h\
bpsk.h \
css.h \
subrx.h
OBJS=\
main.o\
audio.o\
version.o\
discovered.o\
discovery.o\
protocol1_discovery.o\
protocol2_discovery.o\
property.o\
mode.o\
filter.o\
band.o\
radio.o\
receiver.o\
transmitter.o\
vfo.o\
meter.o\
rx_panadapter.o\
tx_panadapter.o\
mic_level.o\
mic_gain.o\
drive_level.o\
wideband_panadapter.o\
wideband_waterfall.o\
waterfall.o\
protocol1.o\
protocol2.o\
radio_dialog.o\
receiver_dialog.o\
transmitter_dialog.o\
pa_dialog.o\
eer_dialog.o\
wideband_dialog.o\
about_dialog.o\
button_text.o\
wideband.o\
vox.o\
ext.o\
configure_dialog.o\
bookmark_dialog.o\
puresignal_dialog.o\
oc_dialog.o\
xvtr_dialog.o\
frequency.o\
rigctl.o\
error_handler.o\
radio_info.o\
bpsk.o \
css.o \
subrx.o
all: prebuild $(PROGRAM) $(HEADERS) $(SOURCES) $(MIDI_SOURCES) $(SOAPYSDR_SOURCES)
prebuild:
rm -f version.o
$(PROGRAM): $(OBJS) $(MIDI_OBJS) $(SOAPYSDR_OBJS)
$(LINK) -o $(PROGRAM) $(OBJS) $(MIDI_OBJS) $(SOAPYSDR_OBJS) $(GTKLIBS) $(LIBS) $(AUDIOLIBS) $(SOAPYSDR_LIBS) $(OPENGL_LIBS)
.c.o:
$(COMPILE) -c -o $@ $<
clean:
-rm -f *.o
-rm -f $(PROGRAM)
install: $(PROGRAM)
cp $(PROGRAM) $(DESTDIR)/usr/local/bin
if [ ! -d /usr/local/share/linhpsdr ]; then mkdir $(DESTDIR)/usr/local/share/linhpsdr; fi
cp hpsdr.png $(DESTDIR)/usr/local/share/linhpsdr
cp hpsdr_icon.png $(DESTDIR)/usr/local/share/linhpsdr
cp hpsdr_small.png $(DESTDIR)/usr/local/share/linhpsdr