Makefile.freebsd 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. CXXLAGS=$(CFLAGS)
  10. LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib -lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng -lz -lm -lcrypt -lXpm -lXmu -lpng -ljpeg
  11. CUSTOM=-DNEEDS_BASENAME
  12. PREFIX=/usr
  13. CFGDIR=/etc
  14. MANDIR=/usr/share/man
  15. DESTDIR=
  16. #######################################################
  17. NAME=slim
  18. VERSION=1.2.5
  19. DEFINES=-DPACKAGE=\"$(NAME)\" -DVERSION=\"$(VERSION)\" \
  20. -DPKGDATADIR=\"$(PREFIX)/share/slim\" -DSYSCONFDIR=\"$(CFGDIR)\"
  21. OBJECTS=jpeg.o png.o main.o image.o numlock.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 $(DESTDIR)$(PREFIX)/bin
  31. install -d $(DESTDIR)$(MANDIR)/man1
  32. install -d $(DESTDIR)$(CFGDIR)
  33. install -m 755 slim $(DESTDIR)$(PREFIX)/bin
  34. install -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1
  35. test -e $(DESTDIR)$(CFGDIR)/slim.conf || \
  36. install -m 644 slim.conf $(DESTDIR)$(CFGDIR)
  37. clean:
  38. @rm -f slim *.o
  39. dist:
  40. @rm -rf $(NAME)-$(VERSION)
  41. @mkdir $(NAME)-$(VERSION)
  42. @cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog README INSTALL TODO \
  43. xinitrc.sample slim.1 THEMES themes slim.conf $(NAME)-$(VERSION)
  44. @rm -rf $(NAME)-$(VERSION)/themes/.svn $(NAME)-$(VERSION)/themes/default/.svn
  45. @tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
  46. @rm -rf $(NAME)-$(VERSION)
  47. install-theme:
  48. install -d -m 755 themes/default \
  49. $(DESTDIR)$(PREFIX)/share/slim/themes/default
  50. install -m 644 themes/default/slim.theme \
  51. $(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
  52. install -m 644 themes/default/panel.png \
  53. $(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
  54. install -m 644 themes/default/background.jpg \
  55. $(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg