Makefile.freebsd 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Makefile for slim - FreeBSD 4 and 5
  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/local/include/freetype2 -I/usr/local/include/freetype2/config -I/usr/local/include/libpng -I/usr/local/include -I/usr/include
  9. LDFLAGS=-L/usr/X11R6/lib -L/usr/local/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.2.6
  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 panel.o
  25. .ifdef USE_PAM
  26. OBJECTS+=PAM.o
  27. .endif
  28. all: slim
  29. slim: $(OBJECTS)
  30. $(CXX) $(LDFLAGS) $(OBJECTS) -o $(NAME)
  31. .cpp.o:
  32. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  33. .c.o:
  34. $(CC) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  35. install: slim install-theme
  36. install -d $(DESTDIR)$(PREFIX)/bin
  37. install -d $(DESTDIR)$(MANDIR)/man1
  38. install -d $(DESTDIR)$(CFGDIR)
  39. install -m 755 slim $(DESTDIR)$(PREFIX)/bin
  40. install -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1
  41. test -e $(DESTDIR)$(CFGDIR)/slim.conf || \
  42. install -m 644 slim.conf $(DESTDIR)$(CFGDIR)
  43. clean:
  44. @rm -f slim *.o
  45. dist:
  46. @rm -rf $(NAME)-$(VERSION)
  47. @mkdir $(NAME)-$(VERSION)
  48. @cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog README INSTALL TODO \
  49. xinitrc.sample slim.1 THEMES themes slim.conf $(NAME)-$(VERSION)
  50. @rm -rf $(NAME)-$(VERSION)/themes/.svn $(NAME)-$(VERSION)/themes/default/.svn
  51. @tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
  52. @rm -rf $(NAME)-$(VERSION)
  53. install-theme:
  54. install -d -m 755 themes/default \
  55. $(DESTDIR)$(PREFIX)/share/slim/themes/default
  56. install -m 644 themes/default/slim.theme \
  57. $(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
  58. install -m 644 themes/default/panel.png \
  59. $(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
  60. install -m 644 themes/default/background.jpg \
  61. $(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg