2021-12-11 04:40:43 +00:00
|
|
|
CC = clang
|
2021-12-15 04:56:16 +00:00
|
|
|
CFLAGS= -O3 -std=gnu11 -Wall
|
|
|
|
LIBS = -lusb-1.0 -lrtlsdr -lpthread -lfftw3f -lcurl -lm
|
|
|
|
|
|
|
|
# Note
|
|
|
|
# gcc is a bit faster that clang on this app
|
|
|
|
# std=gnu11 beacuse gnu17 is not available on Rasbian Stretch
|
|
|
|
# for dbg: -fsanitize=address
|
2016-06-11 21:34:36 +00:00
|
|
|
|
2021-12-04 04:08:36 +00:00
|
|
|
OBJS = rtlsdr_wsprd.o wsprd/wsprd.o wsprd/wsprsim_utils.o wsprd/wsprd_utils.o wsprd/tab.o wsprd/fano.o wsprd/nhash.o
|
2016-06-11 21:34:36 +00:00
|
|
|
|
2021-12-04 03:05:29 +00:00
|
|
|
TARGETS = rtlsdr_wsprd
|
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
|
|
|
|
all: $(TARGETS)
|
|
|
|
|
2016-06-11 21:34:36 +00:00
|
|
|
%.o: %.c
|
|
|
|
${CC} ${CFLAGS} -c $< -o $@
|
|
|
|
|
|
|
|
rtlsdr_wsprd: $(OBJS)
|
2021-12-04 03:05:29 +00:00
|
|
|
$(CC) -o $@ $^ $(LIBS)
|
2016-06-11 21:34:36 +00:00
|
|
|
|
|
|
|
clean:
|
2021-12-11 17:29:31 +00:00
|
|
|
rm -f *.o wsprd/*.o $(TARGETS) fftw_wisdom.dat hashtable.txt selftest.iq
|
2021-12-04 21:44:31 +00:00
|
|
|
|
|
|
|
install:
|
2021-12-15 23:45:30 +00:00
|
|
|
install rtlsdr_wsprd /usr/local/bin/rtlsdr_wsprd
|