$OpenBSD: patch-wmmon_Makefile,v 1.3 2004/08/12 09:33:10 claudio Exp $ --- wmmon/Makefile.orig 1998-05-19 23:12:55.000000000 +0200 +++ wmmon/Makefile 2004-07-28 16:12:41.000000000 +0200 @@ -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 bin -m 555 $(PROG) ${PREFIX}/bin +