Statistics
| Revision:

root / trunk / client / gui / Makefile.am @ 1914

History | View | Annotate | Download (4.2 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) $(LIBNOTIFY_CFLAGS) $(LIBPEAS_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) $(LIBNOTIFY_LIBS) $(LIBPEAS_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/'Unversioned directory'/0/ $(SVN_REV_FILE) > tmp; \
73
                 mv tmp $(SVN_REV_FILE); \
74
                 sed s/M.*// $(SVN_REV_FILE) > tmp; \
75
                 mv tmp $(SVN_REV_FILE);; \
76
         *) \
77
                 sed -i.backup s/:.*// $(SVN_REV_FILE); \
78
                 sed -i.backup s/exported/0/ $(SVN_REV_FILE); \
79
                 sed -i.backup s/'Unversioned directory'/0/ $(SVN_REV_FILE); \
80
                 sed -i.backup s/M.*// $(SVN_REV_FILE);; \
81
 esac
82

                
83
if WIN32
84
nntpgrab_gui_debug_CFLAGS = ${nntpgrab_gui_CFLAGS}
85
endif
86

                
87
uidir = $(pkgdatadir)
88

                
89
dist_ui_DATA = nntpgrab_gui.ui
90

                
91
# Start menu shortcut
92
appsdir = $(datadir)/applications
93
apps_DATA = nntpgrab.desktop
94

                
95
distpixmapdir = $(datadir)/pixmaps
96
distpixmap_DATA = nntpgrab.png
97

                
98
EXTRA_DIST += nntpgrab.desktop
99

                
100
# Build the resource file on Win32 environments
101
if WIN32
102
nntpgrab_gui_DEPENDENCIES += resource.o
103
nntpgrab_gui_LDADD += resource.o
104

                
105
resource.rc: resource.rc.in $(SVN_REV_FILE)
106
      echo $$(cat $(SVN_REV_FILE))
107
      sed -e "s/@MAJOR_VERSION@/$$(grep MAJOR_VERSION $(top_srcdir)/configure.in | awk '{ print $$2 }' | sed s/,//)/g" \
108
          -e "s/@MINOR_VERSION@/$$(grep MINOR_VERSION $(top_srcdir)/configure.in | awk '{ print $$2 }' | sed s/,//)/g" \
109
          -e "s/@MICRO_VERSION@/$$(grep MICRO_VERSION $(top_srcdir)/configure.in | awk '{ print $$2 }' | sed s/,//)/g" \
110
          -e "s/@SVNREV@/$$(cat $(SVN_REV_FILE))/g" \
111
          [email protected] > $@
112

                
113
resource.o: resource.rc
114
      $(WINDRES) resource.rc $@
115
endif
116

                
117
SUBDIRS = plugins
118