blob: 52f5602fc26e301ff79c06793e9cd5ae717ebb90 (
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/proc.o -c src/proc.c
8 cc $(CCOPTS) -o obj/status.o -c src/status.c
9 cc $(CCOPTS) -o cmon obj/*.o src/main.c
10
11 valgrind: all
12 $(info Running memory leak check)
13 valgrind \
14 --leak-check=full \
15 --show-leak-kinds=all \
16 --error-exitcode=1 \
17 ./cmon
|