lfsr/Makefile

22 lines
353 B
Makefile

APP=main
AWK=awk
CC=gcc
CFLAGS=-std=gnu11 -O2
SRCS = $(wildcard *.c)
OBJS = $(SRCS:.c=.o)
.PHONY: all clean
all: clean $(APP) plot
$(APP): $(OBJS)
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
clean:
$(RM) $(OBJS) $(APP) plot.png
plot: $(APP)
./$(APP) $(TAPS) | $(AWK) -v k=0 '{ print k " " $$1; k++ }' > 16bit.txt
gnuplot plot
xdg-open plot.png