Skip to content

Commit c6684fd

Browse files
author
m5evt
committed
Manual merge g0orx
Also slight tweak to cwdaemon to get it to work with hellocontest
1 parent 3872b75 commit c6684fd

25 files changed

+2571
-479
lines changed

Makefile

+35-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# find what system we are running on
2+
UNAME_S := $(shell uname -s)
3+
14
# Get git commit version and date
25
#GIT_VERSION := $(shell git --no-pager describe --tags --always --dirty)
36
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`
1316
#OPENGL_INCLUDES=`pkg-config --cflags epoxy`
1417
#OPENGL_LIBS=`pkg-config --libs epoxy`
1518

19+
ifeq ($(UNAME_S), Linux)
1620
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
1729

1830
# uncomment the line below to include SoapySDR support
1931
#
@@ -42,6 +54,7 @@ soapy_discovery.o \
4254
soapy_protocol.o
4355
endif
4456

57+
ifeq ($(UNAME_S), Linux)
4558
# cwdaemon support. Allows linux based logging software to key an Hermes/HermesLite2
4659
# needs :
4760
# https://github.com/m5evt/unixcw-3.5.1.git
@@ -58,17 +71,25 @@ cwdaemon.h
5871
CWDAEMON_OBJS= \
5972
cwdaemon.o
6073
endif
74+
endif
6175

6276
# MIDI code from piHPSDR written by Christoph van Wullen, DL1YCF.
6377
MIDI_INCLUDE=MIDI
6478

6579
ifeq ($(MIDI_INCLUDE),MIDI)
6680
MIDI_OPTIONS=-D MIDI
67-
MIDI_SOURCES= alsa_midi.c midi2.c midi3.c midi_dialog.c
6881
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
6989
MIDI_OBJS= alsa_midi.o midi2.o midi3.o midi_dialog.o
7090
MIDI_LIBS= -lasound
7191
endif
92+
endif
7293

7394
CFLAGS= -g -Wno-deprecated-declarations -O3
7495
OPTIONS= $(MIDI_OPTIONS) $(AUDIO_OPTIONS) $(SOAPYSDR_OPTIONS) \
@@ -77,9 +98,15 @@ OPTIONS= $(MIDI_OPTIONS) $(AUDIO_OPTIONS) $(SOAPYSDR_OPTIONS) \
7798
-D GIT_DATE='"$(GIT_DATE)"' -D GIT_VERSION='"$(GIT_VERSION)"'
7899
#OPTIONS=-g -Wno-deprecated-declarations $(AUDIO_OPTIONS) -D GIT_DATE='"$(GIT_DATE)"' -D GIT_VERSION='"$(GIT_VERSION)"' -O3 -D FT8_MARKER
79100

101+
102+
ifeq ($(UNAME_S), Linux)
80103
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
81108

82-
INCLUDES=$(GTKINCLUDES) $(OPGL_INCLUDES)
109+
INCLUDES=$(GTKINCLUDES) $(PULSEINCLUDES) $(OPGL_INCLUDES)
83110

84111
COMPILE=$(CC) $(CFLAGS) $(OPTIONS) $(INCLUDES)
85112

@@ -145,7 +172,8 @@ level_meter.c \
145172
tx_info.c \
146173
tx_info_meter.c \
147174
peak_detect.c \
148-
subrx.c
175+
subrx.c \
176+
actions.c
149177

150178
HEADERS=\
151179
main.h\
@@ -205,7 +233,8 @@ level_meter.h \
205233
tx_info.h \
206234
tx_info_meter.h \
207235
peak_detect.h \
208-
subrx.h
236+
subrx.h \
237+
actions.h
209238

210239
OBJS=\
211240
main.o\
@@ -264,7 +293,8 @@ level_meter.o \
264293
tx_info.o \
265294
tx_info_meter.o \
266295
peak_detect.o \
267-
subrx.o
296+
subrx.o \
297+
actions.o
268298

269299

270300
$(PROGRAM): $(OBJS) $(SOAPYSDR_OBJS) $(CWDAEMON_OBJS) $(MIDI_OBJS)

Makefile.mac

-237
This file was deleted.

0 commit comments

Comments
 (0)