TDE base libraries and programs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
2.5 KiB

  1. # the most documentation you find in Makefile.am
  2. # this file is just to demonstrate, how complex it is to
  3. # write good Makefiles, if you don't use automake ;)
  4. # export the variables, we're using
  5. prefix = @prefix@
  6. exec_prefix = @exec_prefix@
  7. top_srcdir = @top_srcdir@
  8. kde_appsdir = @kde_appsdir@
  9. kde_cgidir = @kde_cgidir@
  10. kde_confdir = @kde_confdir@
  11. kde_datadir = @kde_datadir@
  12. kde_htmldir = @kde_htmldir@
  13. kde_icondir = @kde_icondir@
  14. kde_locale = @kde_locale@
  15. kde_mimedir = @kde_mimedir@
  16. kde_minidir = @kde_minidir@
  17. kde_toolbardir = @kde_toolbardir@
  18. kde_wallpaperdir= @kde_wallpaperdir@
  19. bindir = @bindir@
  20. all_includes = @all_includes@
  21. all_libraries = @all_libraries@
  22. MOC = @MOC@
  23. XGETTEXT = @XGETTEXT@
  24. CXX = @CXX@
  25. LDFLAGS = @LDFLAGS@
  26. CXXFLAGS = @CXXFLAGS@
  27. LIBSOCKET = @LIBSOCKET@
  28. INSTALL = @INSTALL@
  29. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  30. INSTALL_DATA = @INSTALL_DATA@
  31. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  32. # define some variables
  33. mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
  34. APPSDIR = $(kde_appsdir)/Utilities
  35. INCLUDES = $(all_includes)
  36. TARGET = khexdit
  37. LIBS = -lkfm -ltdeui -ltdecore -lqt -lX11 -lXext $(LIBSOCKET)
  38. LDFLAGS += $(all_libraries)
  39. # rules to make .o files
  40. .SUFFIXES: .cpp
  41. .cpp.o:
  42. $(CXX) $(CXXFLAGS) $(DEFS) $(INCLUDES) -c $<
  43. OBJECTS = hexfile.o hexwidget.o
  44. SRCMOCS = hexwidget.moc hexfile.moc
  45. all: $(TARGET)
  46. $(TARGET): $(SRCMOCS) $(OBJECTS)
  47. $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
  48. # recreate the Makefile
  49. Makefile: Makefile.in
  50. cd .. && CONFIG_FILES=khexdit/$@ CONFIG_HEADERS= $(SHELL) ./config.status
  51. install: install-data install-exec
  52. # make messages.po. Move this one to ../po/ and "make merge" in po
  53. messages:
  54. $(XGETTEXT) -C -ktranslate *.cpp
  55. install-exec: $(TARGET)
  56. $(mkinstalldirs) $(bindir)
  57. $(INSTALL_PROGRAM) $(TARGET) $(bindir)
  58. install-data:
  59. (cd doc && $(MAKE) install-data)
  60. $(mkinstalldirs) $(APPSDIR)
  61. $(INSTALL_DATA) khexdit.kdelnk $(APPSDIR)
  62. $(mkinstalldirs) $(kde_icondir)
  63. $(INSTALL_DATA) khexdit.xpm $(kde_icondir)
  64. $(mkinstalldirs) $(kde_minidir)
  65. $(INSTALL_DATA) mini-khexdit.xpm $(kde_minidir)/khexdit.xpm
  66. uninstall:
  67. (cd doc && $(MAKE) uninstall)
  68. -rm -f $(bindir)/$(TARGET)
  69. -rm -f $(APPSDIR)/khexdit.kdelnk
  70. -rm -f $(kde_icondir)/khexdit.xpm
  71. -rm -f $(kde_minidir)/khexdit.xpm
  72. clean:
  73. -rm -f $(TARGET) $(OBJECTS) *~ core
  74. distclean: clean
  75. -rm -f Makefile $(SRCMOCS)
  76. # add a dependcy for all moc files to help some FreeBSD users ;)
  77. hexwidget.moc: hexwidget.h
  78. $(MOC) hexwidget.h -o hexwidget.moc
  79. hexfile.moc: hexfile.h
  80. $(MOC) hexfile.h -o hexfile.moc