Add cpustat (C implementation) to get rid of iostat/sysctl/etc
This commit is contained in:
24
cpustat/Makefile
Normal file
24
cpustat/Makefile
Normal file
@ -0,0 +1,24 @@
|
||||
CC?=
|
||||
PREFIX?=/usr/local
|
||||
CPPFLAGS=-I$(PREFIX)/include
|
||||
CFLAGS=-Wall -Wextra -g -O2 -pipe -funroll-loops -ffast-math -fno-strict-aliasing
|
||||
CFLAGS+=$(CPPFLAGS)
|
||||
LDFLAGS=-L$(PREFIX)/lib
|
||||
LDLIBS=-lm
|
||||
RM?=rm -f
|
||||
|
||||
CPUSTAT = cpustat
|
||||
OBJ = cpustat.o
|
||||
|
||||
all: $(CPUSTAT)
|
||||
|
||||
$(CPUSTAT): $(OBJ)
|
||||
$(CC) $(LDFLAGS) $(OBJ) $(LDLIBS) -o $?
|
||||
|
||||
install: all
|
||||
install -s -C $(CPUSTAT) $(PREFIX)/bin
|
||||
|
||||
clean:
|
||||
$(RM) *.o *.a a.out core temp.* $(PROGS)
|
||||
$(RM) -r *.dSYM
|
||||
|
Reference in New Issue
Block a user