diff --git a/wmtime/Makefile b/wmtime/Makefile index 0b3ce5c..561c0f4 100755 --- a/wmtime/Makefile +++ b/wmtime/Makefile @@ -1,19 +1,22 @@ -LIBDIR = -L/usr/X11R6/lib LIBS = -lXpm -lXext -lX11 -lm OBJS = wmtime.o \ wmgeneral/wmgeneral.o \ wmgeneral/misc.o \ wmgeneral/list.o XPMS = wmtime-master.xpm wmtime-mask.xbm +PREFIX = /usr/local +BINDIR = $(PREFIX)/bin +MANDIR = $(PREFIX)/share/man/man1 +INSTALL = install CC = gcc -CFLAGS += -O2 +CFLAGS = -O2 -Wall .c.o: - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -c -Wall $< -o $*.o + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o wmtime: $(OBJS) $(XPMS) - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o wmtime $(OBJS) $(LIBDIR) $(LIBS) + $(CC) $(LDFLAGS) -o wmtime $(OBJS) $(LIBS) clean:: for i in $(OBJS) ; do \ @@ -22,4 +25,7 @@ clean:: rm -f wmtime install:: wmtime - install -m 755 wmtime $(DESTDIR)/usr/bin + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) wmtime $(DESTDIR)$(BINDIR) + $(INSTALL) -d $(DESTDIR)$(MANDIR) + $(INSTALL) -m 644 wmtime.1 $(DESTDIR)$(MANDIR)