wmitime: Update Makefile.

In particular,
- Remove reference to deprecated X11R6 directory.
- Replace FLAGS variable with CFLAGS, CPPFLAGS, and LDFLAGS.
- Honor CC, PREFIX, and DESTDIR variables.
- Use INSTALL instead of cp for installation.
- Remove redundant -lXext flag.
- Move contents of wmitime directory to top directory to ease the building
  process.

Inspired in part by the Debian patches [1,2].

[1] http://sources.debian.net/src/wmitime/0.3%2B20120605-1/debian/patches/20-makefile-CC.patch/
[2] http://sources.debian.net/src/wmitime/0.3%2B20120605-1/debian/patches/make-install.patch/
This commit is contained in:
Doug Torrance 2014-12-20 01:57:03 -06:00 committed by Carlos R. Mafra
parent 7bc4cffcc7
commit 0fbe3d839a
8 changed files with 32 additions and 50 deletions

30
wmitime/Makefile Normal file
View file

@ -0,0 +1,30 @@
#LANG = fr
LIBS = -lXpm -lXext -lX11 -lm
CFLAGS = -O2 -Wall
OBJS = wmitime.o \
wmgeneral/wmgeneral.o \
wmgeneral/misc.o \
wmgeneral/list.o
INSTALL = install
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
.c.o:
$(CC) $(CPPFLAGS) $(CFLAGS) -D$(LANG) -c $< -o $*.o
wmitime: $(OBJS)
$(CC) $(LDFLAGS) -o wmitime $^ $(LIBS)
all:: wmtime
clean::
for i in $(OBJS) ; do \
rm -f $$i ; \
done
rm -f wmitime
rm -f *~
install:: wmitime
$(INSTALL) -d $(DESTDIR)$(BINDIR)
$(INSTALL) wmitime $(DESTDIR)$(BINDIR)
@echo "wmitime Installation finished..."

View file

@ -20,7 +20,6 @@ Let me know what you think of it. ;)
Installing Installing
-------------------------------------------------------------- --------------------------------------------------------------
cd wmitime
make make
make install make install

View file

@ -28,8 +28,8 @@
#include <X11/xpm.h> #include <X11/xpm.h>
#include <X11/extensions/shape.h> #include <X11/extensions/shape.h>
#include "../wmgeneral/wmgeneral.h" #include "wmgeneral/wmgeneral.h"
#include "../wmgeneral/misc.h" #include "wmgeneral/misc.h"
#ifdef fr_FR #ifdef fr_FR
#define fr #define fr

View file

@ -1,47 +0,0 @@
#LANG = fr
LIBDIR = -L/usr/X11R6/lib
LIBS = -lXpm -lXext -lX11 -lm
FLAGS = -O2
OBJS = wmitime.o \
../wmgeneral/wmgeneral.o \
../wmgeneral/misc.o \
../wmgeneral/list.o
.c.o:
cc -I/usr/X11R6/share/include $(FLAGS) -D$(LANG) -c -Wall $< -o $*.o
wmtime: $(OBJS)
cc $(FLAGS) -D$(LANG) -o wmitime $^ -lXext $(LIBDIR) $(LIBS)
all:: wmtime
clean::
for i in $(OBJS) ; do \
rm -f $$i ; \
done
rm -f wmitime
rm -f *~
install:: wmitime
cp -f wmitime /usr/local/bin/
chmod 755 /usr/local/bin/wmitime
chown root:root /usr/local/bin/wmitime
# cp wminetrc $(HOME)/.wminetrc
# chmod 600 $(HOME)/.wminetrc
# cp wminetrc /etc/wminetrc
# chmod 644 /etc/wminetrc
@echo "wmitime Installation finished..."