Makefile.openbsd 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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.2
  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 \
  21. util.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. 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. test -e $(DESTDIR)$(CFGDIR)/slim.conf || \
  49. install -m 644 slim.conf $(DESTDIR)$(CFGDIR)
  50. clean:
  51. @rm -f slim *.o
  52. dist:
  53. @rm -rf $(NAME)-$(VERSION)
  54. @mkdir $(NAME)-$(VERSION)
  55. @cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog README INSTALL TODO \
  56. xinitrc.sample slim.1 THEMES themes slim.conf $(NAME)-$(VERSION)
  57. @rm -rf $(NAME)-$(VERSION)/themes/.svn $(NAME)-$(VERSION)/themes/default/.svn
  58. @tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
  59. @rm -rf $(NAME)-$(VERSION)
  60. install-theme:
  61. install -d -m 755 themes/default \
  62. $(DESTDIR)$(PREFIX)/share/slim/themes/default
  63. install -m 644 themes/default/slim.theme \
  64. $(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
  65. install -m 644 themes/default/panel.png \
  66. $(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
  67. install -m 644 themes/default/background.jpg \
  68. $(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg