[Pkg-wmaker-commits] [wmifinfo] 26/49: wmifinfo: Update Makefile.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Tue Aug 18 02:07:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmifinfo.
commit f673c10d30f402252bcadd0a78b0d0128dc73000
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Mon Dec 8 21:01:47 2014 -0600
wmifinfo: Update Makefile.
In particular, add support for common user-defined variables CFLAGS,
CPPFLAGS, LDFLAGS, DESTDIR, and PREFIX. Also remove reference to
deprecated X11R6 directory and use install instead of cp for install
target.
Inspired by the Debian patches:
http://sources.debian.net/src/wmifinfo/0.09-7/debian/patches/makefile_add_ldflags.patch/
http://sources.debian.net/src/wmifinfo/0.09-7/debian/patches/makefile_patch.patch/
---
Makefile | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index bb935a8..38da6c9 100644
--- a/Makefile
+++ b/Makefile
@@ -13,9 +13,12 @@ VERSION=0.09
CC = gcc
LD = gcc
-COPTS = -Wall -O2 -D'VERSION="$(VERSION)"' -D'NAME="$(NAME)"'
-LDOPTS = -lX11 -L/usr/X11R6/lib -lXpm -lXext
-BINDIR = /usr/local/bin
+INSTALL = install
+CFLAGS = -Wall -O2
+COPTS = -D'VERSION="$(VERSION)"' -D'NAME="$(NAME)"'
+LDOPTS = -lX11 -lXpm -lXext
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
BIN = wmifinfo
FILES = wmifinfo.o xutils.o
@@ -28,16 +31,17 @@ endif
all: $(BIN)
.c.o:
- $(CC) $(COPTS) -c $<
+ $(CC) $(COPTS) $(CPPFLAGS) $(CFLAGS) -c $<
$(BIN): $(FILES)
- $(LD) -o $@ $(FILES) $(LDOPTS)
+ $(LD) $(LDFLAGS) -o $@ $(FILES) $(LDOPTS)
clean:
rm -f *.o $(BIN) core ./.#* *.orig *.rej
install:
- cp $(BIN) $(BINDIR)
+ $(INSTALL) -d $(DESTDIR)$(BINDIR)
+ $(INSTALL) $(BIN) $(DESTDIR)$(BINDIR)
dist: clean
rm -rf /tmp/wmifinfo-$(VERSION)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmifinfo.git
More information about the Pkg-wmaker-commits
mailing list