# # Makefile for gmemusage-0.2 # # User-settable options # Define BELL_ON_UNKNOWN_KEYPRESS to have gmemusage beep whenever an unknown # key (including modifiers) is pressed. # # BELL_ON_UNKNOWN_KEYPRESS = -DBELL_ON_UNKNOWN_KEYPRESS # # Define USE_PASTELS to have gmemusage use pastel colors instead of the # default red, green, blue for it's stack. # USE_PASTELS = -DPASTEL_COLORS # # Define this for freeing the double-buffer pixmap after each draw_window() # SAVE_XSERVER_MEMORY = -DSAVE_XSERVER_MEMORY # # Change these variables as necessary # CC = gcc OPTIM = -O2 # change to -g for debugging LIBX11DIR = -L /usr/X11R6/lib PREFIX = /usr/local # # You shouldn't need to modify anything below this line # OPTIONS = $(BELL_ON_UNKNOWN_KEYPRESS) $(USE_PASTELS) $(SAVE_XSERVER_MEMORY) CFLAGS = $(OPTIM) -Wall $(OPTIONS) LDFLAGS = $(OPTIM) LIBX11 = $(LIBX11DIR) -lX11 LIBS = $(LIBX11) BINDIR = $(PREFIX)/bin MANDIR = $(PREFIX)/man/man1 OBJS = gmemusage.o hash.o proc.o resource.o gmemusage: $(OBJS) $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBX11) gmemusage.o: gmemusage.c memusage.xbm common.h defaults.h resource.o: resource.c defaults.h common.h proc.o: proc.c common.h hash.o: hash.c common.h proctest: proctest.o hash.o $(CC) $(LDFLAGS) -o $@ proctest.o hash.o proctest.o: proc.c common.h $(CC) $(CFLAGS) -DDEBUG -o proctest.o -c proc.c install: gmemusage install -m 0755 -o bin -g bin gmemusage $(BINDIR)/gmemusage install -m 0644 -o bin -g bin gmemusage.1 $(MANDIR)/gmemusage.1 clean: rm -f *.o \#* *~ *.orig x proctest gmemusage core