Makefile.openbsd 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Makefile for slim - OpenBSD
  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/local/include/libpng -I/usr/local/include -I/usr/include
  9. LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib -lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng -lz -lm -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.3.0
  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 app.o panel.o
  21. .SUFFIXES: .c.o .cpp.o
  22. all: slim
  23. slim: $(OBJECTS)
  24. $(CXX) $(LDFLAGS) $(OBJECTS) -o $(NAME)
  25. main.o:
  26. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c main.cpp -o $@
  27. image.o:
  28. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c image.cpp -o $@
  29. numlock.o:
  30. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c numlock.cpp -o $@
  31. cfg.o:
  32. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c cfg.cpp -o $@
  33. switchuser.o:
  34. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c switchuser.cpp -o $@
  35. app.o:
  36. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c app.cpp -o $@
  37. panel.o:
  38. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c panel.cpp -o $@
  39. .c.o:
  40. $(CC) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  41. install: slim install-theme
  42. install -d $(DESTDIR)$(PREFIX)/bin
  43. install -d $(DESTDIR)$(MANDIR)/man1
  44. install -d $(DESTDIR)$(CFGDIR)
  45. install -m 755 slim $(DESTDIR)$(PREFIX)/bin
  46. install -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1
  47. test -e $(DESTDIR)$(CFGDIR)/slim.conf || \
  48. install -m 644 slim.conf $(DESTDIR)$(CFGDIR)
  49. clean:
  50. @rm -f slim *.o
  51. dist:
  52. @rm -rf $(NAME)-$(VERSION)
  53. @mkdir $(NAME)-$(VERSION)
  54. @cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog README INSTALL TODO \
  55. xinitrc.sample slim.1 THEMES themes slim.conf $(NAME)-$(VERSION)
  56. @rm -rf $(NAME)-$(VERSION)/themes/.svn $(NAME)-$(VERSION)/themes/default/.svn
  57. @tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
  58. @rm -rf $(NAME)-$(VERSION)
  59. install-theme:
  60. install -d -m 755 themes/default \
  61. $(DESTDIR)$(PREFIX)/share/slim/themes/default
  62. install -m 644 themes/default/slim.theme \
  63. $(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
  64. install -m 644 themes/default/panel.png \
  65. $(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
  66. install -m 644 themes/default/background.jpg \
  67. $(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg