Makefile.freebsd 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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.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 $(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. install -m 644 slim.conf $(DESTDIR)$(CFGDIR)
  36. clean:
  37. @rm -f slim *.o
  38. dist:
  39. @rm -rf $(NAME)-$(VERSION)
  40. @mkdir $(NAME)-$(VERSION)
  41. @cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog README TODO \
  42. xinitrc.sample slim.1 THEMES themes slim.conf $(NAME)-$(VERSION)
  43. @rm -rf $(NAME)-$(VERSION)/themes/.svn $(NAME)-$(VERSION)/themes/default/.svn
  44. @tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
  45. @rm -rf $(NAME)-$(VERSION)
  46. install-theme:
  47. install -d -m 755 themes/default \
  48. $(DESTDIR)$(PREFIX)/share/slim/themes/default
  49. install -m 644 themes/default/slim.theme \
  50. $(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
  51. install -m 644 themes/default/panel.png \
  52. $(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
  53. install -m 644 themes/default/background.jpg \
  54. $(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg