Improve makefile
This commit is contained in:
parent
d726bc1982
commit
243f0062d9
19
Makefile
19
Makefile
|
@ -1,16 +1,17 @@
|
||||||
#
|
#
|
||||||
# gcc -I/usr/include -L/usr/lib -lperfstat -o test test.c
|
# Use GNU-Make (gmake) for building
|
||||||
|
#
|
||||||
|
bin = aix-disk-perfstat
|
||||||
|
src = $(wildcard *.c)
|
||||||
|
obj = $(src:.c=.o)
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS=
|
LDFLAGS = -lperfstat
|
||||||
BIN=aix-disk-perfstat
|
|
||||||
|
|
||||||
default: main
|
$(bin): $(obj)
|
||||||
|
$(CC) -o $@ $^ $(LDFLAGS)
|
||||||
main: main.o
|
|
||||||
$(CC) -lperfstat -o $(BIN) main.c
|
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
-rm -f main.o
|
rm -f $(obj) $(bin)
|
||||||
-rm -f $(BIN)
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue