Makefile.netbsd 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Makefile for slim - NetBSD
  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/X11R6/include/freetype2 -I/usr/X11R6/include/freetype2/config -I/usr/pkg/include -I/usr/include
  9. LDFLAGS=-L/usr/X11R6/lib -L/usr/pkg/lib -lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng -lz -lm -lcrypt -lXmu -lpng -ljpeg
  10. CUSTOM=-DNEEDS_BASENAME
  11. PREFIX=/usr
  12. CFGDIR=/etc
  13. MANDIR=/usr/share/man
  14. DESTDIR=
  15. #######################################################
  16. NAME=slim
  17. VERSION=1.2.5
  18. DEFINES=-DPACKAGE=\"$(NAME)\" -DVERSION=\"$(VERSION)\" \
  19. -DPKGDATADIR=\"$(PREFIX)/share/slim\" -DSYSCONFDIR=\"$(CFGDIR)\"
  20. OBJECTS=jpeg.o png.o main.o image.o numlock.o cfg.o switchuser.o input.o app.o panel.o
  21. all: slim
  22. slim: $(OBJECTS)
  23. $(CXX) $(LDFLAGS) $(OBJECTS) -o $(NAME)
  24. .cpp.o:
  25. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  26. .c.o:
  27. $(CC) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  28. install: slim install-theme
  29. install -d $(DESTDIR)$(PREFIX)/bin
  30. install -d $(DESTDIR)$(MANDIR)/man1
  31. install -d $(DESTDIR)$(CFGDIR)
  32. install -m 755 slim $(DESTDIR)$(PREFIX)/bin
  33. install -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1
  34. test -e $(DESTDIR)$(CFGDIR)/slim.conf || \
  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 INSTALL 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