--- Makefile.orig 1998-12-03 23:33:58.000000000 +0800 +++ Makefile 2014-06-24 15:23:31.901094203 +0800 @@ -2,22 +2,24 @@ # Makefile,v 1.8 1998/12/03 15:33:58 rneswold Exp # -PREFIX=/usr/local MANDIR=${PREFIX}/man BINDIR=${PREFIX}/bin -LIBDIR = -L/usr/X11R6/lib -L/usr/local/lib +LIBDIR = -L${LOCALBASE}/lib LIBS = -lXpm -lXext -lX11 -lkvm OBJS = main.o if.o wmgeneral.o -INCDIR = -I${X11BASE}/include +INCDIR = -I${LOCALBASE}/include + +CC ?= cc +CFLAGS ?= -O .c.o : - cc -c -g -O1 -Wall ${INCDIR} $< -o $*.o + $(CC) -c $(CFLAGS) -g -Wall ${INCDIR} $< -o $*.o all :: wmnet wmnet : $(OBJS) - cc -o wmnet $(OBJS) $(LIBDIR) $(LIBS) ${INCDIR} + $(CC) -o wmnet $(OBJS) $(LIBDIR) $(LIBS) ${INCDIR} main.o : wmnet-mask.xbm wmnet-master.xpm wmnet.h wmgeneral.h @@ -29,9 +31,9 @@ clean : rm -f $(OBJS) wmnet install.man : wmnet.1 - install -c -m 644 -o man -g man wmnet.1 ${MANDIR}/man1 + install -c -m 644 wmnet.1 $(DESTDIR)${MANDIR}/man1 install.bin : wmnet - install -s -c -m 2555 -o bin -g kmem wmnet ${BINDIR} + install -s -c wmnet $(DESTDIR)${BINDIR} install : install.bin install.man