[Pkg-wmaker-commits] [wmtime] 16/101: wmtime: Update Makefile.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:59:24 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmtime.

commit 28bfd975b96e86675ad2fcf85e005263f7fb051c
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Sat Jan 3 16:16:18 2015 -0600

    wmtime: Update Makefile.
    
    In particular,
    - Remove reference to deprecated X11R6 directory.
    - Honor PREFIX and INSTALL variables.
    - Change definition of CFLAGS from += to =; perhaps users don't want to
      append -O2. Also move -Wall to CFLAGS.
    - Use C*FLAGS only when compiling and LDFLAGS only when linking.
    - Create directories if needed during install.
    - Install manpage.
---
 Makefile | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 0b3ce5c..561c0f4 100755
--- a/Makefile
+++ b/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)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmtime.git



More information about the Pkg-wmaker-commits mailing list