Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Makefile for slim - generic Linux
  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=-Wall -I. -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/libpng12 -I/usr/include
  9. CXXFLAGS=$(CFLAGS)
  10. LDFLAGS=-lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng12 -lz -lm -lcrypt -lXmu -lpng -ljpeg
  11. CUSTOM=-DHAVE_SHADOW
  12. ifdef USE_PAM
  13. LDFLAGS+= -lpam
  14. CUSTOM+= -DUSE_PAM
  15. endif
  16. PREFIX=/usr
  17. CFGDIR=/etc
  18. MANDIR=/usr/man
  19. DESTDIR=
  20. #######################################################
  21. NAME=slim
  22. VERSION=1.3.0
  23. DEFINES=-DPACKAGE=\"$(NAME)\" -DVERSION=\"$(VERSION)\" \
  24. -DPKGDATADIR=\"$(PREFIX)/share/slim\" -DSYSCONFDIR=\"$(CFGDIR)\"
  25. OBJECTS=jpeg.o png.o main.o image.o numlock.o cfg.o switchuser.o app.o panel.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) $(CXXFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  34. .c.o:
  35. $(CC) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  36. install: slim install-theme
  37. install -D -m 755 slim $(DESTDIR)$(PREFIX)/bin/slim
  38. install -D -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1/slim.1
  39. test -e $(DESTDIR)$(CFGDIR)/slim.conf || \
  40. install -D -m 644 slim.conf $(DESTDIR)$(CFGDIR)/slim.conf
  41. clean:
  42. @rm -f slim *.o
  43. dist:
  44. @rm -rf $(NAME)-$(VERSION)
  45. @mkdir $(NAME)-$(VERSION)
  46. @cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog INSTALL README TODO \
  47. xinitrc.sample slim.1 THEMES themes slim.conf $(NAME)-$(VERSION)
  48. @rm -rf $(NAME)-$(VERSION)/themes/.svn $(NAME)-$(VERSION)/themes/default/.svn
  49. @tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
  50. @rm -rf $(NAME)-$(VERSION)
  51. install-theme:
  52. install -D -m 644 themes/default/slim.theme \
  53. $(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
  54. install -D -m 644 themes/default/panel.png \
  55. $(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
  56. install -D -m 644 themes/default/background.jpg \
  57. $(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg