-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (33 loc) · 822 Bytes
/
Copy pathMakefile
File metadata and controls
47 lines (33 loc) · 822 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
CFLAGS = -Wall -g -Iinclude
CC = gcc
CLIBS = -lncurses
.SUFFIXES: .c .o
.c.o:
$(CC) -c $(CFLAGS) $*.c -o $*.o
OBJS = \
src/errors.c \
src/main.c \
src/netmon.c \
src/rate.c \
src/ui.c \
src/args.c
TARGET = netmon
default: $(TARGET)
$(TARGET): $(OBJS:.c=.o)
$(CC) $(CFLAGS) $^ -o $(TARGET) $(CLIBS)
args.o: src/args.c include/args.h include/packet.h include/errors.h
errors.o: src/errors.c include/errors.h
main.o: src/main.c include/netmon.h include/errors.h include/args.h
netmon.o: src/netmon.c include/netmon.h include/errors.h include/ui.h include/packet.h include/rate.h
rate.o: src/rate.c include/rate.h
ui.o: src/ui.c include/ui.h
run: $(TARGET)
./$(TARGET)
clean:
rm -f src/errors.o
rm -f src/main.o
rm -f src/netmon.o
rm -f src/rate.o
rm -f src/ui.o
rm -f src/args.o
rm -f $(TARGET)