1
+ # find what system we are running on
2
+ UNAME_S := $(shell uname -s)
3
+
1
4
# Get git commit version and date
2
5
# GIT_VERSION := $(shell git --no-pager describe --tags --always --dirty)
3
6
GIT_DATE := $(firstword $(shell git --no-pager show --date=short --format="% ai" --name-only) )
@@ -13,7 +16,16 @@ GTKLIBS=`pkg-config --libs gtk+-3.0`
13
16
# OPENGL_INCLUDES=`pkg-config --cflags epoxy`
14
17
# OPENGL_LIBS=`pkg-config --libs epoxy`
15
18
19
+ ifeq ($(UNAME_S ) , Linux)
16
20
AUDIO_LIBS =-lasound -lpulse-simple -lpulse -lpulse-mainloop-glib -lsoundio
21
+ AUDIO_SOURCES =audio.c
22
+ AUDIO_HEADRERS =audio.h
23
+ endif
24
+ ifeq ($(UNAME_S ) , Darwin)
25
+ AUDIO_LIBS =-lsoundio
26
+ AUDIO_SOURCES =portaudio.c
27
+ AUDIO_HEADRERS =portaudio.h
28
+ endif
17
29
18
30
# uncomment the line below to include SoapySDR support
19
31
#
@@ -42,6 +54,7 @@ soapy_discovery.o \
42
54
soapy_protocol.o
43
55
endif
44
56
57
+ ifeq ($(UNAME_S ) , Linux)
45
58
# cwdaemon support. Allows linux based logging software to key an Hermes/HermesLite2
46
59
# needs :
47
60
# https://github.com/m5evt/unixcw-3.5.1.git
@@ -58,17 +71,25 @@ cwdaemon.h
58
71
CWDAEMON_OBJS = \
59
72
cwdaemon.o
60
73
endif
74
+ endif
61
75
62
76
# MIDI code from piHPSDR written by Christoph van Wullen, DL1YCF.
63
77
MIDI_INCLUDE =MIDI
64
78
65
79
ifeq ($(MIDI_INCLUDE ) ,MIDI)
66
80
MIDI_OPTIONS =-D MIDI
67
- MIDI_SOURCES = alsa_midi.c midi2.c midi3.c midi_dialog.c
68
81
MIDI_HEADERS = midi.h midi_dialog.h
82
+ ifeq ($(UNAME_S ) , Darwin)
83
+ MIDI_SOURCES = mac_midi.c midi2.c midi3.c midi_dialog.c
84
+ MIDI_OBJS = mac_midi.o midi2.o midi3.o midi_dialog.o
85
+ MIDI_LIBS = -framework CoreMIDI -framework Foundation
86
+ endif
87
+ ifeq ($(UNAME_S ) , Linux)
88
+ MIDI_SOURCES = alsa_midi.c midi2.c midi3.c midi_dialog.c
69
89
MIDI_OBJS = alsa_midi.o midi2.o midi3.o midi_dialog.o
70
90
MIDI_LIBS = -lasound
71
91
endif
92
+ endif
72
93
73
94
CFLAGS = -g -Wno-deprecated-declarations -O3
74
95
OPTIONS = $(MIDI_OPTIONS ) $(AUDIO_OPTIONS ) $(SOAPYSDR_OPTIONS ) \
@@ -77,9 +98,15 @@ OPTIONS= $(MIDI_OPTIONS) $(AUDIO_OPTIONS) $(SOAPYSDR_OPTIONS) \
77
98
-D GIT_DATE='"$(GIT_DATE ) "' -D GIT_VERSION='"$(GIT_VERSION ) "'
78
99
# OPTIONS=-g -Wno-deprecated-declarations $(AUDIO_OPTIONS) -D GIT_DATE='"$(GIT_DATE)"' -D GIT_VERSION='"$(GIT_VERSION)"' -O3 -D FT8_MARKER
79
100
101
+
102
+ ifeq ($(UNAME_S ) , Linux)
80
103
LIBS =-lrt -lm -lpthread -lwdsp $(GTKLIBS ) $(AUDIO_LIBS ) $(SOAPYSDR_LIBS ) $(CWDAEMON_LIBS ) $(OPENGL_LIBS ) $(MIDI_LIBS )
104
+ endif
105
+ ifeq ($(UNAME_S ) , Darwin)
106
+ LIBS =-lm -lpthread -lwdsp $(GTKLIBS ) $(AUDIO_LIBS ) $(SOAPYSDR_LIBS ) $(MIDI_LIBS )
107
+ endif
81
108
82
- INCLUDES =$(GTKINCLUDES ) $(OPGL_INCLUDES )
109
+ INCLUDES =$(GTKINCLUDES ) $(PULSEINCLUDES ) $( OPGL_INCLUDES )
83
110
84
111
COMPILE =$(CC ) $(CFLAGS ) $(OPTIONS ) $(INCLUDES )
85
112
@@ -145,7 +172,8 @@ level_meter.c \
145
172
tx_info.c \
146
173
tx_info_meter.c \
147
174
peak_detect.c \
148
- subrx.c
175
+ subrx.c \
176
+ actions.c
149
177
150
178
HEADERS =\
151
179
main.h\
@@ -205,7 +233,8 @@ level_meter.h \
205
233
tx_info.h \
206
234
tx_info_meter.h \
207
235
peak_detect.h \
208
- subrx.h
236
+ subrx.h \
237
+ actions.h
209
238
210
239
OBJS =\
211
240
main.o\
@@ -264,7 +293,8 @@ level_meter.o \
264
293
tx_info.o \
265
294
tx_info_meter.o \
266
295
peak_detect.o \
267
- subrx.o
296
+ subrx.o \
297
+ actions.o
268
298
269
299
270
300
$(PROGRAM ) : $(OBJS ) $(SOAPYSDR_OBJS ) $(CWDAEMON_OBJS ) $(MIDI_OBJS )
0 commit comments