Makefile.openbsd 2.5 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. CXXLAGS=$(CFLAGS)
  10. LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib -lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng -lz -lm -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. .SUFFIXES: .c.o .cpp.o
  23. all: slim
  24. slim: $(OBJECTS)
  25. $(CXX) $(LDFLAGS) $(OBJECTS) -o $(NAME)
  26. main.o:
  27. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c main.cpp -o $@
  28. image.o:
  29. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c image.cpp -o $@
  30. cfg.o:
  31. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c cfg.cpp -o $@
  32. switchuser.o:
  33. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c switchuser.cpp -o $@
  34. input.o:
  35. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c input.cpp -o $@
  36. app.o:
  37. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c app.cpp -o $@
  38. panel.o:
  39. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c panel.cpp -o $@
  40. .c.o:
  41. $(CC) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  42. install: slim install-theme
  43. install -d $(DESTDIR)$(PREFIX)/bin
  44. install -d $(DESTDIR)$(MANDIR)/man1
  45. install -d $(DESTDIR)$(CFGDIR)
  46. install -m 755 slim $(DESTDIR)$(PREFIX)/bin
  47. install -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1
  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 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