c3bbc28146
2. General cleanup in wmmon/wmmon.c 3. If you have root privs and exit, you'll get "Broken pipe". This occurs upon execution of XCloseDisplay() (which followed by exit(0)). Handle it with signal(SIGPIPE, exit). Submitted by maintainer.
46 lines
980 B
Plaintext
46 lines
980 B
Plaintext
$OpenBSD: patch-wmmon_Makefile,v 1.2 2001/04/14 02:38:31 naddy Exp $
|
|
--- wmmon/Makefile.orig Sat Mar 17 11:25:25 2001
|
|
+++ wmmon/Makefile Sat Mar 17 11:25:25 2001
|
|
@@ -1,19 +1,27 @@
|
|
-LIBDIR = -L/usr/X11R6/lib
|
|
-LIBS = -lXpm -lXext -lX11
|
|
-OBJS = wmmon.o \
|
|
- ../wmgeneral/wmgeneral.o \
|
|
- ../wmgeneral/misc.o \
|
|
- ../wmgeneral/list.o
|
|
-
|
|
+LIBDIR = -L${X11BASE}/lib
|
|
+LIBS = -lXpm -lXext -lX11 -lkvm
|
|
+CFLAGS ?= -O2 -Wall
|
|
+CFLAGS += -I${X11BASE}/include
|
|
+OBJS = wmmon.o \
|
|
+ ../wmgeneral/wmgeneral.o \
|
|
+ ../wmgeneral/misc.o \
|
|
+ ../wmgeneral/list.o
|
|
+PROG = wmmon
|
|
+PREFIX ?= /usr/local
|
|
|
|
.c.o:
|
|
- cc -c -O2 -Wall $< -o $*.o
|
|
+ ${CC} -c $(CFLAGS) $< -o $@
|
|
+
|
|
+$(PROG): $(OBJS)
|
|
+ ${CC} -o $@ $> $(LIBDIR) $(LIBS)
|
|
|
|
-wmmon: $(OBJS)
|
|
- cc -o wmmon $^ $(LIBDIR) $(LIBS)
|
|
+all:: $(PROG)
|
|
|
|
clean::
|
|
- for i in $(OBJS) ; do \
|
|
- rm $$i;\
|
|
- done
|
|
- rm wmmon
|
|
+ rm -f $(OBJS)
|
|
+ rm -f $(PROG)
|
|
+
|
|
+install::
|
|
+ mkdir -p $(PREFIX)/bin
|
|
+ install -c -s -o root -g kmem -m 2555 $(PROG) ${PREFIX}/bin
|
|
+
|