Makefile.netbsd 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Makefile for slim - NetBSD
  2. #
  3. # Edit the following section to adjust the options
  4. # to fit into your operating system / distribution
  5. #######################################################
  6. CXX=/usr/bin/g++
  7. CC=/usr/bin/gcc
  8. CFLAGS=-I. -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include/freetype2/config -I/usr/pkg/include -I/usr/include
  9. LDFLAGS=-L/usr/X11R6/lib -L/usr/pkg/lib -lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng -lz -lm -lcrypt -lXmu -lpng -ljpeg
  10. CUSTOM=-DNEEDS_BASENAME
  11. .ifdef(USE_PAM)
  12. LDFLAGS+= -lpam
  13. CUSTOM+= -DUSE_PAM
  14. .endif
  15. PREFIX=/usr
  16. CFGDIR=/etc
  17. MANDIR=/usr/share/man
  18. DESTDIR=
  19. #######################################################
  20. NAME=slim
  21. VERSION=1.3.2
  22. DEFINES=-DPACKAGE=\"$(NAME)\" -DVERSION=\"$(VERSION)\" \
  23. -DPKGDATADIR=\"$(PREFIX)/share/slim\" -DSYSCONFDIR=\"$(CFGDIR)\"
  24. OBJECTS=jpeg.o png.o main.o image.o numlock.o cfg.o switchuser.o app.o \
  25. panel.o util.o
  26. .ifdef USE_PAM
  27. OBJECTS+=PAM.o
  28. .endif
  29. all: slim
  30. slim: $(OBJECTS)
  31. $(CXX) $(LDFLAGS) $(OBJECTS) -o $(NAME)
  32. .cpp.o:
  33. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  34. .c.o:
  35. $(CC) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  36. install: slim install-theme
  37. install -d $(DESTDIR)$(PREFIX)/bin
  38. install -d $(DESTDIR)$(MANDIR)/man1
  39. install -d $(DESTDIR)$(CFGDIR)
  40. install -m 755 slim $(DESTDIR)$(PREFIX)/bin
  41. install -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1
  42. test -e $(DESTDIR)$(CFGDIR)/slim.conf || \
  43. install -m 644 slim.conf $(DESTDIR)$(CFGDIR)
  44. clean:
  45. @rm -f slim *.o
  46. dist:
  47. @rm -rf $(NAME)-$(VERSION)
  48. @mkdir $(NAME)-$(VERSION)
  49. @cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog README INSTALL TODO \
  50. xinitrc.sample slim.1 THEMES themes slim.conf $(NAME)-$(VERSION)
  51. @rm -rf $(NAME)-$(VERSION)/themes/.svn $(NAME)-$(VERSION)/themes/default/.svn
  52. @tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
  53. @rm -rf $(NAME)-$(VERSION)
  54. install-theme:
  55. install -d -m 755 themes/default \
  56. $(DESTDIR)$(PREFIX)/share/slim/themes/default
  57. install -m 644 themes/default/slim.theme \
  58. $(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
  59. install -m 644 themes/default/panel.png \
  60. $(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
  61. install -m 644 themes/default/background.jpg \
  62. $(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg