root / branches / nntpgrab-0.7 / client / gui / Makefile.am @ 1922
History | View | Annotate | Download (4.9 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) $(GLADE_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) $(GLADE_LIBS) $(CURL_LIBS) $(LIBXML2_LIBS) $(SOUP_LIBS) $(SOUP_GNOME_LIBS) $(DBUS_LIBS) $(LIBNOTIFY_LIBS) |
| 24 |
|
| 25 |
EXTRA_DIST += \ |
| 26 |
nntpgrab_gui.glade \ |
| 27 |
nntpgrab_gui.ui \ |
| 28 |
nntpgrab_gui_gtk3.ui \ |
| 29 |
nntpgrab.png \ |
| 30 |
nntpgrab.ico |
| 31 |
|
| 32 |
noinst_HEADERS = \ |
| 33 |
donate.xpm \ |
| 34 |
gui.h \ |
| 35 |
config_gui.h |
| 36 |
|
| 37 |
nntpgrab_gui_SOURCES = callbacks.c config.c config_display.c config_gui.c \ |
| 38 |
config_folders.c config_notifications.c config_servers.c config_nzbcreator.c \ |
| 39 |
config_autoimport.c config_par2.c connections.c debug.c info.c main.c monitor.c \ |
| 40 |
notify.c nzb.c queue.c par2.c gui_nzbcreator.c auto_import.c auto_shutdown.c \ |
| 41 |
gui_plugins.c config_plugins.c |
| 42 |
|
| 43 |
# Create an auto-incrementing build number. |
| 44 |
|
| 45 |
SVN_REV_FILE="svnrev.txt" |
| 46 |
BUILD_NUMBER_FILE="buildnumber.txt" |
| 47 |
|
| 48 |
if DARWIN |
| 49 |
# Mac OS X doesn't know the --defsym option... |
| 50 |
nntpgrab_gui_CFLAGS += "-D__BUILD_SVN_REV=$$(cat $(SVN_REV_FILE))" |
| 51 |
nntpgrab_gui_CFLAGS += "-D__BUILD_DATE=$$(date +'%Y%m%d')" |
| 52 |
nntpgrab_gui_CFLAGS += "-D__BUILD_NUMBER=$$(cat $(BUILD_NUMBER_FILE))" |
| 53 |
BUILT_SOURCES = $(SVN_REV_FILE) $(BUILD_NUMBER_FILE) |
| 54 |
else |
| 55 |
nntpgrab_gui_LDFLAGS += -Xlinker --defsym -Xlinker __BUILD_SVN_REV=$$(cat $(SVN_REV_FILE)) |
| 56 |
nntpgrab_gui_LDFLAGS += -Xlinker --defsym -Xlinker __BUILD_DATE=$$(date +'%Y%m%d') |
| 57 |
nntpgrab_gui_LDFLAGS += -Xlinker --defsym -Xlinker __BUILD_NUMBER=$$(cat $(BUILD_NUMBER_FILE)) |
| 58 |
endif |
| 59 |
|
| 60 |
# Build number file. Increment if any object file changes. |
| 61 |
nntpgrab_gui_DEPENDENCIES = $(BUILD_NUMBER_FILE) $(SVN_REV_FILE) |
| 62 |
$(BUILD_NUMBER_FILE): $(nntpgrab_gui_SOURCES) |
| 63 |
if ! test -f $(BUILD_NUMBER_FILE); then echo 0 > $(BUILD_NUMBER_FILE); fi |
| 64 |
echo $$(($$(cat $(BUILD_NUMBER_FILE)) + 1)) > $(BUILD_NUMBER_FILE) |
| 65 |
|
| 66 |
$(SVN_REV_FILE): $(nntpgrab_gui_SOURCES) |
| 67 |
svnversion -n > $(SVN_REV_FILE) 2> /dev/null || echo 0 > $(SVN_REV_FILE) |
| 68 |
case "`uname -s`" in \ |
| 69 |
MINGW32_*) \ |
| 70 |
sed s/:.*// $(SVN_REV_FILE) >> tmp; \ |
| 71 |
mv tmp $(SVN_REV_FILE); \ |
| 72 |
sed s/exported/0/ $(SVN_REV_FILE) > tmp; \ |
| 73 |
mv tmp $(SVN_REV_FILE); \ |
| 74 |
sed s/'Unversioned directory'/0/ $(SVN_REV_FILE) > tmp; \ |
| 75 |
mv tmp $(SVN_REV_FILE); \ |
| 76 |
sed s/M.*// $(SVN_REV_FILE) > tmp; \ |
| 77 |
mv tmp $(SVN_REV_FILE);; \ |
| 78 |
*) \ |
| 79 |
sed -i.backup s/:.*// $(SVN_REV_FILE); \ |
| 80 |
sed -i.backup s/exported/0/ $(SVN_REV_FILE); \ |
| 81 |
sed -i.backup s/'Unversioned directory'/0/ $(SVN_REV_FILE); \ |
| 82 |
sed -i.backup s/M.*// $(SVN_REV_FILE);; \ |
| 83 |
esac |
| 84 |
|
| 85 |
if DARWIN |
| 86 |
nntpgrab_gui_SOURCES += ipc_osx.c |
| 87 |
nntpgrab_gui_CFLAGS += $(MAC_INTEGRATION_CFLAGS) |
| 88 |
nntpgrab_gui_LDFLAGS += $(MAC_INTEGRATION_LIBS) -Wl,-framework,Cocoa,-framework,Carbon |
| 89 |
endif |
| 90 |
|
| 91 |
if WIN32 |
| 92 |
nntpgrab_gui_SOURCES += ipc_win32.c |
| 93 |
endif |
| 94 |
|
| 95 |
if !WIN32 |
| 96 |
if !DARWIN |
| 97 |
if HAVE_DBUS |
| 98 |
BUILT_SOURCES = nntpgrab_gui_dbus_glue.h |
| 99 |
CLEANFILES = $(BUILT_SOURCES) |
| 100 |
|
| 101 |
nntpgrab_gui_dbus_glue.h: nntpgrab_gui_dbus.xml |
| 102 |
$(LIBTOOL) --mode=execute dbus-binding-tool --prefix=nntpgrab_dbus --mode=glib-server --output=nntpgrab_gui_dbus_glue.h $(srcdir)/nntpgrab_gui_dbus.xml |
| 103 |
endif |
| 104 |
|
| 105 |
nntpgrab_gui_SOURCES += ipc_linux.c |
| 106 |
endif |
| 107 |
endif |
| 108 |
|
| 109 |
if WIN32 |
| 110 |
nntpgrab_gui_debug_CFLAGS = ${nntpgrab_gui_CFLAGS}
|
| 111 |
endif |
| 112 |
|
| 113 |
uidir = $(pkgdatadir) |
| 114 |
|
| 115 |
dist_ui_DATA = nntpgrab_gui.glade nntpgrab_gui.ui nntpgrab_gui_gtk3.ui |
| 116 |
|
| 117 |
# Start menu shortcut |
| 118 |
appsdir = $(datadir)/applications |
| 119 |
apps_DATA = nntpgrab.desktop |
| 120 |
|
| 121 |
distpixmapdir = $(datadir)/pixmaps |
| 122 |
distpixmap_DATA = nntpgrab.png |
| 123 |
|
| 124 |
EXTRA_DIST += nntpgrab.desktop nntpgrab_gui_dbus.xml |
| 125 |
|
| 126 |
# Build the resource file on Win32 environments |
| 127 |
if WIN32 |
| 128 |
nntpgrab_gui_DEPENDENCIES += resource.o |
| 129 |
nntpgrab_gui_LDADD += resource.o |
| 130 |
|
| 131 |
resource.rc: resource.rc.in $(SVN_REV_FILE) |
| 132 |
echo $$(cat $(SVN_REV_FILE)) |
| 133 |
sed -e "s/@MAJOR_VERSION@/$$(grep MAJOR_VERSION $(top_srcdir)/configure.in | awk '{ print $$2 }' | sed s/,//)/g" \
|
| 134 |
-e "s/@MINOR_VERSION@/$$(grep MINOR_VERSION $(top_srcdir)/configure.in | awk '{ print $$2 }' | sed s/,//)/g" \
|
| 135 |
-e "s/@MICRO_VERSION@/$$(grep MICRO_VERSION $(top_srcdir)/configure.in | awk '{ print $$2 }' | sed s/,//)/g" \
|
| 136 |
-e "s/@SVNREV@/$$(cat $(SVN_REV_FILE))/g" \ |
| 137 |
[email protected] > $@ |
| 138 |
|
| 139 |
resource.o: resource.rc |
| 140 |
$(WINDRES) resource.rc $@ |
| 141 |
endif |
NNTPGrab

