Makefile.openbsd 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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.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. .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. numlock.o:
  31. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c numlock.cpp -o $@
  32. cfg.o:
  33. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c cfg.cpp -o $@
  34. switchuser.o:
  35. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c switchuser.cpp -o $@
  36. input.o:
  37. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c input.cpp -o $@
  38. app.o:
  39. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c app.cpp -o $@
  40. panel.o:
  41. $(CXX) $(CFLAGS) $(DEFINES) $(CUSTOM) -c panel.cpp -o $@
  42. .c.o:
  43. $(CC) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
  44. install: slim install-theme
  45. install -d $(DESTDIR)$(PREFIX)/bin
  46. install -d $(DESTDIR)$(MANDIR)/man1
  47. install -d $(DESTDIR)$(CFGDIR)
  48. install -m 755 slim $(DESTDIR)$(PREFIX)/bin
  49. install -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1
  50. test -e $(DESTDIR)$(CFGDIR)/slim.conf || \
  51. install -m 644 slim.conf $(DESTDIR)$(CFGDIR)
  52. clean:
  53. @rm -f slim *.o
  54. dist:
  55. @rm -rf $(NAME)-$(VERSION)
  56. @mkdir $(NAME)-$(VERSION)
  57. @cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog README INSTALL TODO \
  58. xinitrc.sample slim.1 THEMES themes slim.conf $(NAME)-$(VERSION)
  59. @rm -rf $(NAME)-$(VERSION)/themes/.svn $(NAME)-$(VERSION)/themes/default/.svn
  60. @tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
  61. @rm -rf $(NAME)-$(VERSION)
  62. install-theme:
  63. install -d -m 755 themes/default \
  64. $(DESTDIR)$(PREFIX)/share/slim/themes/default
  65. install -m 644 themes/default/slim.theme \
  66. $(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
  67. install -m 644 themes/default/panel.png \
  68. $(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
  69. install -m 644 themes/default/background.jpg \
  70. $(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg