Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
753 B

  1. # vim:ts=8
  2. CC ?= cc
  3. CFLAGS ?= -O2
  4. CFLAGS += -Wall -Wunused -Wmissing-prototypes -Wstrict-prototypes -Wunused
  5. PREFIX ?= /usr/local
  6. BINDIR ?= $(PREFIX)/bin
  7. MANDIR ?= $(PREFIX)/man/man1
  8. INSTALL_PROGRAM ?= install -s
  9. INSTALL_DATA ?= install
  10. X11BASE ?= /usr/X11R6
  11. INCLUDES?= -I$(X11BASE)/include
  12. LDPATH ?= -L$(X11BASE)/lib
  13. LIBS += -lX11 -lXfixes -lXi
  14. PROG = xbanish
  15. OBJS = xbanish.o
  16. all: $(PROG)
  17. $(PROG): $(OBJS)
  18. $(CC) $(OBJS) $(LDPATH) $(LIBS) -o $@
  19. $(OBJS): *.c
  20. $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
  21. install: all
  22. mkdir -p $(DESTDIR)$(BINDIR)
  23. $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(BINDIR)
  24. mkdir -p $(DESTDIR)$(MANDIR)
  25. $(INSTALL_DATA) -m 644 xbanish.1 $(DESTDIR)$(MANDIR)/xbanish.1
  26. clean:
  27. rm -f $(PROG) $(OBJS)
  28. .PHONY: all install clean