-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
39 lines (29 loc) · 853 Bytes
/
Makefile
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
33
34
35
36
37
38
39
CC = gcc
CFLAGS += -Wall -pedantic
objects = ./src/jitter3.o ./src/gnuplot_i.o ./src/jitter_data.o ./src/time_tools.o ./src/menu.o
TARGET = ./jitter
.PHONY: all test clean
./jitter : $(objects)
$(CC) -I ./headers $(CFLAGS) $^ -o $@ -lpcap
./src/jitter3.o : ./src/jitter3.c
$(CC) -I ./headers -c $(CFLAGS) $^ -o $@
./src/gnuplot_i.o : ./src/gnuplot_i.c
$(CC) -I ./headers -c $(CFLAGS) -w $^ -o $@
./src/menu.o : ./src/menu.c
$(CC) -I ./headers -c $(CFLAGS) $^ -o $@
./src/jitter_data.o : ./src/jitter_data.c
$(CC) -I ./headers -c $(CFLAGS) $^ -o $@
./src/time_tools.o : ./src/time_tools.c
$(CC) -I ./headers -c $(CFLAGS) $^ -o $@
all : $(TARGET)
test: ./jitter
@echo "Testing"
chmod +x test.sh
xterm -e sudo ./test.sh &
sudo ./jitter
@echo "Test OK"
clean:
@echo "Removing garbage."
-rm -f ./jitter
-rm -f ./src/*.o
-rm -f *.txt