rtlsdr-wsprd/Makefile

33 wiersze
770 B
Makefile

CC = clang
CFLAGS = -O3 -std=gnu17
LIBS = -lusb-1.0 -lrtlsdr -lpthread -lfftw3f -lcurl -lm
# Note
# gcc is a bit faster that clang on this app
# for dbg: -Wall -fsanitize=address
OBJS = rtlsdr_wsprd.o wsprd/wsprd.o wsprd/wsprsim_utils.o wsprd/wsprd_utils.o wsprd/tab.o wsprd/fano.o wsprd/nhash.o
TARGETS = rtlsdr_wsprd rtlsdr_wsprd.1
.PHONY: all clean
all: $(TARGETS)
%.o: %.c
${CC} ${CFLAGS} -c $< -o $@
rtlsdr_wsprd: $(OBJS)
$(CC) -o $@ $^ $(LIBS)
clean:
rm -f *.o *.1.gz wsprd/*.o $(TARGETS) fftw_wisdom.dat hashtable.txt selftest.iq
install:
install rtlsdr_wsprd /usr/local/bin/rtlsdr_wsprd
install rtlsdr_wsprd.1.gz /usr/local/man/man1/rtlsdr_wsprd.1.gz
%.1: %.c | %
-help2man --no-info --no-discard-stderr --output=$@ ./$|
gzip rtlsdr_wsprd.1