From 44d68e454e78f20d0fc88e82b7fe98e1dc80ebc1 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Wed, 22 Oct 2014 16:34:34 -0500 Subject: [PATCH] wmifs: Update Makefile. Patch by Jordi Mallach . First appeared in Debian package version 1.3b1-6. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=27458 for more information. --- wmifs/wmifs/Makefile | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/wmifs/wmifs/Makefile b/wmifs/wmifs/Makefile index 4316b3e..299cb35 100755 --- a/wmifs/wmifs/Makefile +++ b/wmifs/wmifs/Makefile @@ -1,3 +1,10 @@ + +DESTDIR = +prefix =/usr/local +bindir=${prefix}/bin +CONF=/etc + +CC = gcc LIBDIR = -L/usr/X11R6/lib LIBS = -lXpm -lXext -lX11 OBJS = wmifs.o \ @@ -5,29 +12,32 @@ OBJS = wmifs.o \ ../wmgeneral/misc.o \ ../wmgeneral/list.o +CFLAGS = -Wall -O2 -g + +INSTALL = /usr/bin/install +INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755 +INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755 +INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644 .c.o: - cc -c -O2 -Wall $< -o $*.o + $(CC) -c $(CFLAGS) $< -o $*.o wmifs: $(OBJS) - cc -o wmifs $^ -lXext $(LIBDIR) $(LIBS) + $(CC) -o wmifs $^ -lXext $(LIBDIR) $(LIBS) all:: wmifs clean:: for i in $(OBJS) ; do \ - rm $$i ; \ + rm -f $$i ; \ done - rm wmifs + rm -f wmifs install:: - cp -f wmifs /usr/local/bin/ - chmod 755 /usr/local/bin/wmifs - chown root:root /usr/local/bin/wmifs - cp sample.wmifsrc /etc/wmifsrc - chown root:root /etc/wmifsrc - chmod 644 /etc/wmifsrc - cp -f sample.wmifsrc $(HOME)/.wmifsrc - echo "WMiFS-1.3beta installation finished..." - echo " " - echo "have fun! ;-)" + $(INSTALL_DIR) $(DESTDIR)$(bindir) + $(INSTALL_DIR) $(DESTDIR)$(CONF) + $(INSTALL_PROGRAM) wmifs $(DESTDIR)$(bindir) + $(INSTALL_FILE) sample.wmifsrc $(DESTDIR)$(CONF)/wmifsrc + @echo "WMiFS-1.3beta installation finished..." + @echo " " + @echo "have fun! ;-)"