2013-12-25 08:59:10 +01:00
|
|
|
# Makefile for SoftFM
|
|
|
|
|
|
|
|
# ----- Tweak these settings to configure for your system
|
|
|
|
|
|
|
|
CROSS =
|
|
|
|
CFLAGS_OPT = -O2 -ffast-math -ftree-vectorize
|
|
|
|
CFLAGS_DEBUG = -g
|
|
|
|
CFLAGS_ARCH =
|
|
|
|
CFLAGS_PATH = -I/home/joris/test/rtl-sdr/inst/include
|
|
|
|
CFLAGS_EXTRA =
|
|
|
|
LDFLAGS_PATH = -L/home/joris/test/rtl-sdr/inst/lib
|
|
|
|
LDFLAGS_EXTRA =
|
2013-12-29 00:25:58 +01:00
|
|
|
LIBS_ALSA = -lasound
|
2013-12-25 08:59:10 +01:00
|
|
|
LIBS_RTLSDR = /home/joris/test/rtl-sdr/inst/lib/librtlsdr.a -lusb-1.0
|
|
|
|
LIBS_EXTRA =
|
|
|
|
|
|
|
|
# ----- end tweakable settings
|
|
|
|
|
|
|
|
|
|
|
|
CXX = $(CROSS)g++
|
2013-12-29 00:25:58 +01:00
|
|
|
CXXFLAGS = -std=c++11 -Wall -D_FILE_OFFSET_BITS=64 \
|
|
|
|
$(CFLAGS_OPT) $(CFLAGS_DEBUG) \
|
2013-12-25 08:59:10 +01:00
|
|
|
$(CFLAGS_ARCH) $(CFLAGS_PATH) $(CFLAGS_EXTRA)
|
|
|
|
LDFLAGS = $(LDFLAGS_PATH) $(LDFLAGS_EXTRA)
|
2013-12-29 00:25:58 +01:00
|
|
|
LDLIBS = $(LIBS_ALSA) $(LIBS_RTLSDR) $(LIBS_EXTRA)
|
2013-12-25 08:59:10 +01:00
|
|
|
|
|
|
|
OBJS = RtlSdrSource.o Filter.o FmDecode.o AudioOutput.o main.o
|
|
|
|
|
|
|
|
softfm : $(OBJS)
|
|
|
|
$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
|
|
|
|
|
|
|
|
RtlSdrSource.o : RtlSdrSource.cc RtlSdrSource.h SoftFM.h
|
|
|
|
Filter.o : Filter.cc Filter.h SoftFM.h
|
|
|
|
FmDecode.o : FmDecode.cc FmDecode.h SoftFM.h Filter.h
|
|
|
|
AudioOutput.o : AudioOutput.cc AudioOutput.h SoftFM.h
|
|
|
|
main.o : main.cc SoftFM.h RtlSdrSource.h Filter.h FmDecode.h AudioOutput.h
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
$(RM) softfm *.o
|
|
|
|
|