blob: 776eae28df8b60a2189b585c5f0c513798e21b6c (
plain)
1 CCOPTS = -O2 --std=gnu18 -Wall -Werror
2 all:
3 if [ ! -d obj ]; then mkdir obj; fi
4 cc $(CCOPTS) -o obj/meminfo.o -c src/meminfo.c
5 cc $(CCOPTS) -o obj/netinfo.o -c src/netinfo.c
6 cc $(CCOPTS) -o obj/cpuinfo.o -c src/cpuinfo.c
7 cc $(CCOPTS) -o obj/diskinfo.o -c src/diskinfo.c
8 cc $(CCOPTS) -o obj/proc.o -c src/proc.c
9 cc $(CCOPTS) -o obj/status.o -c src/status.c
10 cc $(CCOPTS) -o cmon obj/*.o src/main.c
11
12 valgrind: all
13 $(info Running memory leak check)
14 valgrind \
15 --leak-check=full \
16 --show-leak-kinds=all \
17 --error-exitcode=1 \
18 ./cmon
|