create meminfo in memory
Annotate for file Makefile
2009-02-17 tobias 1 all: fopenr.so
23:15:35 ' 2
' 3 fopenr.so: fopenRedirect.o
2009-02-21 tobias 4 $(CC) -shared -ldl -o fopenr.so fopenRedirect.o
2009-02-17 tobias 5
23:15:35 ' 6 fopenRedirect.o: fopenRedirect.c
2009-02-21 tobias 7 $(CC) -Wall -fpic -c fopenRedirect.c
2009-02-17 tobias 8
2009-02-21 tobias 9 ## testing
10:26:12 ' 10 tests/fopen-cat: tests/fopen_cat.o
' 11 $(CC) -o $@ $<
' 12
' 13 .PHONY: test
' 14 test: fopenr.so tests/fopen-cat
' 15 @LD_PRELOAD=./fopenr.so ./tests/fopen-cat 2 "/proc/meminfo" \
' 16 | awk '/Mem:/ { print $$2 }' | cmp tests/mem
' 17
' 18 ## clean
2009-02-17 tobias 19 .PHONY: clean
23:15:35 ' 20 clean:
2009-02-21 tobias 21 rm -f -- *.o
10:26:12 ' 22 rm -f -- *.so
2009-02-21 tobias 23 rm -f -- tests/*.o tests/fopen-cat