[PATCH 04/24] wmifs: Update Makefile.

Doug Torrance <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
In particular,
- Drop unnecessary definition of DESTDIR.
- Drop LIBDIR; pointed to deprecated X11R6 directory.
- Honors CPPFLAGS and LDFLAGS build flags.
- Remove out-of-date version number from installation message.

Based in part on a patch from the Debian package [1].

[1] https://sources.debian.net/src/wmifs/1.4-2/debian/patches/hardening.patch/
---
 wmifs/Makefile | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/wmifs/Makefile b/wmifs/Makefile
index 9dec53d..e2d8986 100755
--- a/wmifs/Makefile
+++ b/wmifs/Makefile
@@ -1,5 +1,3 @@
-
-DESTDIR =
 prefix =/usr/local
 bindir=${prefix}/bin
 datarootdir=${prefix}/share
@@ -8,7 +6,6 @@ man1dir=${mandir}/man1
 CONF=/etc
 
 CC     = gcc
-LIBDIR = -L/usr/X11R6/lib
 LIBS   = -lXpm -lXext -lX11
 OBJS =	wmifs.o \
 		wmgeneral/wmgeneral.o \
@@ -23,10 +20,10 @@ INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
 INSTALL_FILE    = $(INSTALL) -p -o root -g root -m 644
 
 .c.o:
-	$(CC) -c $(CFLAGS) $< -o $*.o
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o
 
 wmifs: $(OBJS)
-	$(CC) -o wmifs $^ -lXext $(LIBDIR) $(LIBS)
+	$(CC) $(LDFLAGS) -o wmifs $^ $(LIBS)
 
 all:: wmifs
 
@@ -43,6 +40,6 @@ install::
 	$(INSTALL_PROGRAM) wmifs $(DESTDIR)$(bindir)
 	$(INSTALL_FILE) sample.wmifsrc $(DESTDIR)$(CONF)/wmifsrc
 	$(INSTALL_FILE) wmifs.1 $(DESTDIR)$(man1dir)
-	@echo "WMiFS-1.3beta installation finished..."
+	@echo "WMiFS installation finished..."
 	@echo " "
 	@echo "have fun! ;-)"
-- 
2.1.4


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.