1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
#
# 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
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)
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) $(OPTIONS) -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
|