Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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=-I. -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/libpng12 -I/usr/include
  9. CXXLAGS=$(CFLAGS)
  10. LDFLAGS=-L/usr/X11R6/lib -lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng12 -lz -lm -lcrypt -lXpm -lXmu -lpng -ljpeg
  11. CUSTOM=-DHAVE_SHADOW
  12. PREFIX=/usr
  13. CFGDIR=/etc
  14. MANDIR=/usr/man
  15. DESTDIR=
  16. #######################################################
  17. NAME=slim
  18. VERSION=1.2.3
  19. DEFINES=-DPACKAGE=\"$(NAME)\" -DVERSION=\"$(VERSION)\" \
  20. -DPKGDATADIR=\"$(PREFIX)/share/slim\" -DSYSCONFDIR=\"$(CFGDIR)\"
  21. OBJECTS=jpeg.o png.o main.o image.o cfg.o switchuser.o input.o app.o panel.o
  22. all: slim
  23. slim: $(OBJECTS)
  24. $(CXX) $(LDFLAGS) $(OBJECTS) -o $(NAME)
  25. .cpp.o:
  26. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  27. .c.o:
  28. $(CC) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  29. install: slim install-theme
  30. install -D -m 755 slim $(DESTDIR)$(PREFIX)/bin/slim
  31. install -D -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1/slim.1
  32. install -D -m 644 slim.conf $(DESTDIR)$(CFGDIR)/slim.conf
  33. clean:
  34. @rm -f slim *.o
  35. dist:
  36. @rm -rf $(NAME)-$(VERSION)
  37. @mkdir $(NAME)-$(VERSION)
  38. @cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog README TODO \
  39. xinitrc.sample slim.1 THEMES themes slim.conf $(NAME)-$(VERSION)
  40. @rm -rf $(NAME)-$(VERSION)/themes/.svn $(NAME)-$(VERSION)/themes/default/.svn
  41. @tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
  42. @rm -rf $(NAME)-$(VERSION)
  43. install-theme:
  44. install -D -m 644 themes/default/slim.theme \
  45. $(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
  46. install -D -m 644 themes/default/panel.png \
  47. $(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
  48. install -D -m 644 themes/default/background.jpg \
  49. $(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg