default: custom_shared_library_mem.so leaky
	@echo "You can now run the noop program just like as ./leaky."
	@echo "Or do a 'export LD_PRELOAD=`pwd`/custom_shared_library_mem.so' before running it!"

custom_shared_library_mem.so: custom_shared_library_mem.c
	gcc -fPIC -DPIC -c custom_shared_library_mem.c  -o custom_shared_library_mem.o
	ld -shared -ldl -o custom_shared_library_mem.so custom_shared_library_mem.o


leaky: leaky.c
	gcc leaky.c -o leaky

clean:
	/bin/rm -f ./leaky *.o *.so
