-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (23 loc) · 988 Bytes
/
Makefile
File metadata and controls
33 lines (23 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CC=gcc
CFLAGS=-Wall -std=gnu99 -O0 -ggdb -Wall -Wextra -Wformat=2 -pedantic -Winit-self -Wstrict-overflow=5 -Wcast-qual -Wcast-align -Wconversion -Waggregate-return -fPIC
# CFLAGS=-Wall -std=c99 -O0 -ggdb
OBJS=rnlms.o CircularBuffer.o global.o median.o
HEAD=global.h rnlms.h CircularBuffer.h rnlms_interface.h median.h
# BIN_FILES=$(wildcard g165/*.dat)
# DAT_FILES=$(BIN_FILES=$:.dat=_ccs.dat)
TESTER_OBJS=tester.c utils.c
TESTER_HEAD=tester.h utils.h
all:main
$(OBJS): %.o: %.c %.h Makefile
$(CC) -c $(CFLAGS) $< -o $@
librnlms.so: $(HEAD) $(OBJS)
$(CC) -shared $(OBJS) $(CFLAGS) -o $@ -lm
main: librnlms.so $(TESTER_OBJS) $(TESTER_HEAD)
$(CC) $(TESTER_OBJS) -o $@ -I./ -lrnlms -L ./ $(CFLAGS)
.PHONY: test
test:
bash -c "export LD_LIBRARY_PATH=`pwd`; cd Debug; ../main"
gnuplot -e "set terminal x11; plot 'Debug/error.dat' binary format='%short' using 1 with lines; pause mouse keypress \"Hit return to continue\";"
.PHONY: clean
clean:
rm -f *.o main *.so