dockapps/wmtime/Makefile
Doug Torrance ad27c973c1 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.
2015-01-03 22:31:44 +00:00

32 lines
644 B
Makefile
Executable file

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 -Wall
.c.o:
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o
wmtime: $(OBJS) $(XPMS)
$(CC) $(LDFLAGS) -o wmtime $(OBJS) $(LIBS)
clean::
for i in $(OBJS) ; do \
rm -f $$i; \
done
rm -f wmtime
install:: wmtime
$(INSTALL) -d $(DESTDIR)$(BINDIR)
$(INSTALL) wmtime $(DESTDIR)$(BINDIR)
$(INSTALL) -d $(DESTDIR)$(MANDIR)
$(INSTALL) -m 644 wmtime.1 $(DESTDIR)$(MANDIR)