PREFIX=/usr/local
OBJS=dockapp.o draw.o mem_linux.o options.o wmmemfree.o
DEFS=-DTIMER_SECONDS=0 -DTIMER_MICROSECONDS=100000 -DOPT_IGNORE_BUFFERS=1 -DOPT_IGNORE_CACHE=1
#TIMER_SECONDS - seconds between refreshes
#TIMER_MICROSECONDS - microseconds between refreshes
#OPT_IGNORE_BUFFERS - subtract buffers memory amount from final displayed amount
#OPT_IGNORE_CACHE - the same, only with cached memory

all: wmmemfree

wmmemfree: $(OBJS)
	gcc -o wmmemfree $(OBJS) -L/usr/X11R6/lib -lX11 -lXpm -lXext
	strip wmmemfree
%.o: %.c
	gcc $(DEFS) -Wall -O2 -c $<
clean:
	rm -f $(OBJS) wmmemfree
install:
	install -m 755 wmmemfree $(PREFIX)/bin/wmmemfree
uninstall:
	rm -f $(PREFIX)/bin/wmmemfree
