From 1fcbf709bb505ec036ecd732c3c61510bf3c3997 Mon Sep 17 00:00:00 2001 From: Philip Lee <752558+rocketman768@users.noreply.github.com> Date: Tue, 11 Sep 2018 21:12:03 -0700 Subject: [PATCH] Provide CXX variable in Makefile for other compiler support --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6ca6cb6..594ac17 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ VERSION = 0.2.6 # USE_RPI_GPU_FFT = 1 +CXX ?= g++ FLAGS = -Wall -O3 -ffast-math -DVERSION=$(VERSION) LIBS = -lpthread -lm -ljpeg -lconfig -lrt @@ -23,19 +24,19 @@ endif all: gsm_scan ogn-rf r2fft_test ogn-rf: Makefile ogn-rf.cc rtlsdr.h thread.h fft.h buffer.h image.h - g++ $(FLAGS) $(GPU_FLAGS) -o ogn-rf ogn-rf.cc $(GPU_SRC) $(LIBS) -lrtlsdr -lfftw3 -lfftw3f + $(CXX) $(FLAGS) $(GPU_FLAGS) -o ogn-rf ogn-rf.cc $(GPU_SRC) $(LIBS) -lrtlsdr -lfftw3 -lfftw3f ifdef USE_RPI_GPU_FFT sudo chown root ogn-rf sudo chmod a+s ogn-rf endif gsm_scan: Makefile gsm_scan.cc rtlsdr.h fft.h buffer.h image.h - g++ $(FLAGS) $(GPU_FLAGS) -o gsm_scan gsm_scan.cc $(GPU_SRC) $(LIBS) -lrtlsdr -lfftw3 -lfftw3f + $(CXX) $(FLAGS) $(GPU_FLAGS) -o gsm_scan gsm_scan.cc $(GPU_SRC) $(LIBS) -lrtlsdr -lfftw3 -lfftw3f ifdef USE_RPI_GPU_FFT sudo chown root gsm_scan sudo chmod a+s gsm_scan endif r2fft_test: Makefile r2fft_test.cc r2fft.h fft.h - g++ $(FLAGS) -o r2fft_test r2fft_test.cc -lm -lfftw3 -lfftw3f + $(CXX) $(FLAGS) -o r2fft_test r2fft_test.cc -lm -lfftw3 -lfftw3f