root / trunk / client / gui / Makefile.am @ 1897
History | View | Annotate | Download (4.7 KB)
| 1 | 
                  ## Process this file with automake to produce Makefile.in  | 
              
|---|---|
| 2 | 
                  include $(top_srcdir)/Makefile.decl  | 
              
| 3 | 
                   | 
              
| 4 | 
                  INCLUDES = $(GLIB_CFLAGS) $(GTK3_CFLAGS) $(GTK_CFLAGS) $(CURL_CFLAGS) $(LIBXML2_CFLAGS) $(SOUP_CFLAGS) $(SOUP_GNOME_CFLAGS) $(DBUS_CFLAGS) $(LIBNOTIFY_CFLAGS) -I$(top_srcdir)/base -I$(top_srcdir)/nntpgrab_core -I$(top_srcdir)/glue -I$(top_srcdir)/gui_base -I$(top_srcdir)/automation -DNNTPGRABLOCALEDIR=\""$(nntpgrablocaledir)"\"  | 
              
| 5 | 
                   | 
              
| 6 | 
                  AM_CFLAGS = -Wall -g  | 
              
| 7 | 
                   | 
              
| 8 | 
                  bin_PROGRAMS = nntpgrab_gui  | 
              
| 9 | 
                   | 
              
| 10 | 
                  nntpgrab_gui_CFLAGS =  | 
              
| 11 | 
                  nntpgrab_gui_LDFLAGS = -export-dynamic $(BUILD_NUMBER_LDFLAGS)  | 
              
| 12 | 
                   | 
              
| 13 | 
                  if WIN32  | 
              
| 14 | 
                  nntpgrab_gui_LDFLAGS += -mwindows  | 
              
| 15 | 
                  nntpgrab_gui_CFLAGS += -D_WIN32_WINNT=0x0501  | 
              
| 16 | 
                   | 
              
| 17 | 
                  bin_PROGRAMS += nntpgrab_gui_debug  | 
              
| 18 | 
                  nntpgrab_gui_debug_SOURCES = nntpgrab-debug.c  | 
              
| 19 | 
                  nntpgrab_gui_debug_LDADD = $(GLIB_LIBS)  | 
              
| 20 | 
                  nntpgrab_gui_debug_LDFLAGS = -mconsole  | 
              
| 21 | 
                  endif  | 
              
| 22 | 
                   | 
              
| 23 | 
                  nntpgrab_gui_LDADD = $(top_srcdir)/base/libnntpgrab_utils.la $(top_srcdir)/glue/libnntpgrab_glue.la $(top_srcdir)/gui_base/libnntpgrab_gui_base.la $(top_srcdir)/automation/libnntpgrab_automation.la $(GLIB_LIBS) $(GTK3_LIBS) $(GTK_LIBS) $(CURL_LIBS) $(LIBXML2_LIBS) $(SOUP_LIBS) $(SOUP_GNOME_LIBS) $(DBUS_LIBS) $(LIBNOTIFY_LIBS)  | 
              
| 24 | 
                   | 
              
| 25 | 
                  EXTRA_DIST += \  | 
              
| 26 | 
                  nntpgrab_gui.ui \  | 
              
| 27 | 
                  nntpgrab.png \  | 
              
| 28 | 
                  nntpgrab.ico  | 
              
| 29 | 
                   | 
              
| 30 | 
                  noinst_HEADERS = \  | 
              
| 31 | 
                  donate.xpm \  | 
              
| 32 | 
                  gui.h \  | 
              
| 33 | 
                  config_gui.h  | 
              
| 34 | 
                   | 
              
| 35 | 
                  nntpgrab_gui_SOURCES = callbacks.c config.c config_display.c config_gui.c \  | 
              
| 36 | 
                  config_folders.c config_notifications.c config_servers.c config_nzbcreator.c \  | 
              
| 37 | 
                  config_autoimport.c config_par2.c connections.c debug.c info.c main.c monitor.c \  | 
              
| 38 | 
                  notify.c nzb.c queue.c par2.c gui_nzbcreator.c auto_import.c auto_shutdown.c \  | 
              
| 39 | 
                  gui_plugins.c config_plugins.c  | 
              
| 40 | 
                   | 
              
| 41 | 
                  # Create an auto-incrementing build number.  | 
              
| 42 | 
                   | 
              
| 43 | 
                  SVN_REV_FILE="svnrev.txt"  | 
              
| 44 | 
                  BUILD_NUMBER_FILE="buildnumber.txt"  | 
              
| 45 | 
                   | 
              
| 46 | 
                  if DARWIN  | 
              
| 47 | 
                  # Mac OS X doesn't know the --defsym option...  | 
              
| 48 | 
                  nntpgrab_gui_CFLAGS += "-D__BUILD_SVN_REV=$$(cat $(SVN_REV_FILE))"  | 
              
| 49 | 
                  nntpgrab_gui_CFLAGS += "-D__BUILD_DATE=$$(date +'%Y%m%d')"  | 
              
| 50 | 
                  nntpgrab_gui_CFLAGS += "-D__BUILD_NUMBER=$$(cat $(BUILD_NUMBER_FILE))"  | 
              
| 51 | 
                  BUILT_SOURCES = $(SVN_REV_FILE) $(BUILD_NUMBER_FILE)  | 
              
| 52 | 
                  else  | 
              
| 53 | 
                  nntpgrab_gui_LDFLAGS += -Xlinker --defsym -Xlinker __BUILD_SVN_REV=$$(cat $(SVN_REV_FILE))  | 
              
| 54 | 
                  nntpgrab_gui_LDFLAGS += -Xlinker --defsym -Xlinker __BUILD_DATE=$$(date +'%Y%m%d')  | 
              
| 55 | 
                  nntpgrab_gui_LDFLAGS += -Xlinker --defsym -Xlinker __BUILD_NUMBER=$$(cat $(BUILD_NUMBER_FILE))  | 
              
| 56 | 
                  endif  | 
              
| 57 | 
                   | 
              
| 58 | 
                  # Build number file. Increment if any object file changes.  | 
              
| 59 | 
                  nntpgrab_gui_DEPENDENCIES = $(BUILD_NUMBER_FILE) $(SVN_REV_FILE)  | 
              
| 60 | 
                  $(BUILD_NUMBER_FILE): $(nntpgrab_gui_SOURCES)  | 
              
| 61 | 
                  if ! test -f $(BUILD_NUMBER_FILE); then echo 0 > $(BUILD_NUMBER_FILE); fi  | 
              
| 62 | 
                  echo $$(($$(cat $(BUILD_NUMBER_FILE)) + 1)) > $(BUILD_NUMBER_FILE)  | 
              
| 63 | 
                   | 
              
| 64 | 
                  $(SVN_REV_FILE): $(nntpgrab_gui_SOURCES)  | 
              
| 65 | 
                  svnversion -n > $(SVN_REV_FILE) 2> /dev/null || echo 0 > $(SVN_REV_FILE)  | 
              
| 66 | 
                  case "`uname -s`" in \  | 
              
| 67 | 
                  MINGW32_*) \  | 
              
| 68 | 
                  sed s/:.*// $(SVN_REV_FILE) >> tmp; \  | 
              
| 69 | 
                  mv tmp $(SVN_REV_FILE); \  | 
              
| 70 | 
                  sed s/exported/0/ $(SVN_REV_FILE) > tmp; \  | 
              
| 71 | 
                  mv tmp $(SVN_REV_FILE); \  | 
              
| 72 | 
                  sed s/M.*// $(SVN_REV_FILE) > tmp; \  | 
              
| 73 | 
                  mv tmp $(SVN_REV_FILE);; \  | 
              
| 74 | 
                  *) \  | 
              
| 75 | 
                  sed -i.backup s/:.*// $(SVN_REV_FILE); \  | 
              
| 76 | 
                  sed -i.backup s/exported/0/ $(SVN_REV_FILE); \  | 
              
| 77 | 
                  sed -i.backup s/M.*// $(SVN_REV_FILE);; \  | 
              
| 78 | 
                  esac  | 
              
| 79 | 
                   | 
              
| 80 | 
                  if DARWIN  | 
              
| 81 | 
                  nntpgrab_gui_SOURCES += ipc_osx.c  | 
              
| 82 | 
                  nntpgrab_gui_CFLAGS += $(MAC_INTEGRATION_CFLAGS)  | 
              
| 83 | 
                  nntpgrab_gui_LDFLAGS += $(MAC_INTEGRATION_LIBS) -Wl,-framework,Cocoa,-framework,Carbon  | 
              
| 84 | 
                  endif  | 
              
| 85 | 
                   | 
              
| 86 | 
                  if WIN32  | 
              
| 87 | 
                  nntpgrab_gui_SOURCES += ipc_win32.c  | 
              
| 88 | 
                  endif  | 
              
| 89 | 
                   | 
              
| 90 | 
                  if !WIN32  | 
              
| 91 | 
                  if !DARWIN  | 
              
| 92 | 
                  if HAVE_DBUS  | 
              
| 93 | 
                  BUILT_SOURCES = nntpgrab_gui_dbus_glue.h  | 
              
| 94 | 
                  CLEANFILES = $(BUILT_SOURCES)  | 
              
| 95 | 
                   | 
              
| 96 | 
                  nntpgrab_gui_dbus_glue.h: nntpgrab_gui_dbus.xml  | 
              
| 97 | 
                  $(LIBTOOL) --mode=execute dbus-binding-tool --prefix=nntpgrab_dbus --mode=glib-server --output=nntpgrab_gui_dbus_glue.h $(srcdir)/nntpgrab_gui_dbus.xml  | 
              
| 98 | 
                  endif  | 
              
| 99 | 
                   | 
              
| 100 | 
                  nntpgrab_gui_SOURCES += ipc_linux.c  | 
              
| 101 | 
                  endif  | 
              
| 102 | 
                  endif  | 
              
| 103 | 
                   | 
              
| 104 | 
                  if WIN32  | 
              
| 105 | 
                  nntpgrab_gui_debug_CFLAGS = ${nntpgrab_gui_CFLAGS}
                 | 
              
| 106 | 
                  endif  | 
              
| 107 | 
                   | 
              
| 108 | 
                  uidir = $(pkgdatadir)  | 
              
| 109 | 
                   | 
              
| 110 | 
                  dist_ui_DATA = nntpgrab_gui.ui  | 
              
| 111 | 
                   | 
              
| 112 | 
                  # Start menu shortcut  | 
              
| 113 | 
                  appsdir = $(datadir)/applications  | 
              
| 114 | 
                  apps_DATA = nntpgrab.desktop  | 
              
| 115 | 
                   | 
              
| 116 | 
                  distpixmapdir = $(datadir)/pixmaps  | 
              
| 117 | 
                  distpixmap_DATA = nntpgrab.png  | 
              
| 118 | 
                   | 
              
| 119 | 
                  EXTRA_DIST += nntpgrab.desktop nntpgrab_gui_dbus.xml  | 
              
| 120 | 
                   | 
              
| 121 | 
                  # Build the resource file on Win32 environments  | 
              
| 122 | 
                  if WIN32  | 
              
| 123 | 
                  nntpgrab_gui_DEPENDENCIES += resource.o  | 
              
| 124 | 
                  nntpgrab_gui_LDADD += resource.o  | 
              
| 125 | 
                   | 
              
| 126 | 
                  resource.rc: resource.rc.in $(SVN_REV_FILE)  | 
              
| 127 | 
                  echo $$(cat $(SVN_REV_FILE))  | 
              
| 128 | 
                        sed -e "s/@MAJOR_VERSION@/$$(grep MAJOR_VERSION $(top_srcdir)/configure.in | awk '{ print $$2 }' | sed s/,//)/g" \
                 | 
              
| 129 | 
                            -e "s/@MINOR_VERSION@/$$(grep MINOR_VERSION $(top_srcdir)/configure.in | awk '{ print $$2 }' | sed s/,//)/g" \
                 | 
              
| 130 | 
                            -e "s/@MICRO_VERSION@/$$(grep MICRO_VERSION $(top_srcdir)/configure.in | awk '{ print $$2 }' | sed s/,//)/g" \
                 | 
              
| 131 | 
                  -e "s/@SVNREV@/$$(cat $(SVN_REV_FILE))/g" \  | 
              
| 132 | 
                  [email protected] > $@  | 
              
| 133 | 
                   | 
              
| 134 | 
                  resource.o: resource.rc  | 
              
| 135 | 
                  $(WINDRES) resource.rc $@  | 
              
| 136 | 
                  endif  | 
              
NNTPGrab

