/[debian]/bti/trunk/Makefile
ViewVC logotype

Contents of /bti/trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1623 - (show annotations)
Thu Mar 12 15:55:34 2009 UTC (11 years, 10 months ago) by gregoa
File size: 3137 byte(s)
New upstream release; from the RELEASE-NOTES:
"--action support, bti now can output data from the twitter
and identica servers".
1 #
2 # Copyright (C) 2006 Greg Kroah-Hartman <greg@kroah.com>
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; version 2 of the License.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 #
18
19 VERSION = 015
20
21 PROGRAM = bti
22
23 CORE_OBJS = \
24 bti.o
25
26 GEN_HEADERS = \
27 bti_version.h
28
29 MAN_PAGES = \
30 bti.1
31
32 CROSS_COMPILE ?=
33 CC = $(CROSS_COMPILE)gcc
34 LD = $(CROSS_COMPILE)gcc
35 AR = $(CROSS_COMPILE)ar
36
37 XML2_CFLAGS = `xml2-config --cflags`
38 override CFLAGS += -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -O2 $(XML2_CFLAGS)
39
40 WARNINGS = -Wstrict-prototypes -Wsign-compare -Wshadow \
41 -Wchar-subscripts -Wmissing-declarations -Wnested-externs \
42 -Wpointer-arith -Wcast-align -Wsign-compare -Wmissing-prototypes
43 CFLAGS += $(WARNINGS)
44 LDFLAGS += -Wl,-warn-common,--as-needed
45
46
47 ifeq ($(strip $(V)),)
48 E = @echo
49 Q = @
50 else
51 E = @\#
52 Q =
53 endif
54 export E Q
55
56
57 # We need -lcurl for the curl stuff
58 # We need -lsocket and -lnsl when on Solaris
59 # We need -lreadline for readline support
60 # We need -lssl and -lcrypto when using libcurl with SSL support
61 # We need -lpthread for the pthread example
62 #LIB_OBJS = -lcurl -lnsl -lssl -lcrypto
63 LIB_OBJS = -lcurl -lnsl -lreadline
64 LIB_XML2 = `xml2-config --libs`
65
66 all: $(PROGRAM) $(MAN_PAGES)
67
68 # "Static Pattern Rule" to build all programs
69 bti: %: $(HEADERS) $(GEN_HEADERS) $(CORE_OBJS)
70 $(E) " LD " $@
71 $(Q) $(LD) $(LDFLAGS) $(CORE_OBJS) -o $@ $(LIB_OBJS) $(LIB_XML2)
72
73
74 # build the objects
75 %.o: %.c $(HEADERS) $(GEN_HEADERS)
76 $(E) " CC " $@
77 $(Q) $(CC) -c $(CFLAGS) $< -o $@
78
79
80 bti_version.h: Makefile
81 $(E) " GENHDR " $@
82 $(Q) echo "/* Generated by make. */" > $@
83 $(Q) echo \#define BTI_VERSION \"$(VERSION)\" >> $@
84
85
86 # man pages
87 %.1: %.xml
88 $(E) " XMLTO " $@
89 $(Q) xmlto man $?
90 .PRECIOUS: %.3
91
92 clean:
93 $(E) " CLEAN "
94 $(Q) - find . -type f -name '*.orig' -print0 | xargs -0r rm -f
95 $(Q) - find . -type f -name '*.rej' -print0 | xargs -0r rm -f
96 $(Q) - find . -type f -name '*~' -print0 | xargs -0r rm -f
97 $(Q) - find . -type f -name '*.[oas]' -print0 | xargs -0r rm -f
98 $(Q) - find . -type f -name "*.gcno" -print0 | xargs -0r rm -f
99 $(Q) - find . -type f -name "*.gcda" -print0 | xargs -0r rm -f
100 $(Q) - find . -type f -name "*.gcov" -print0 | xargs -0r rm -f
101 $(Q) - rm -f core $(PROGRAM) $(GEN_HEADERS)
102 .PHONY: clean
103
104 release:
105 $(Q) - rm -f bti-$(VERSION).tar.gz
106 head -1 ChangeLog | grep -q "to v$(VERSION)"
107 head -1 RELEASE-NOTES | grep -q "bti $(VERSION)"
108 git commit -a -m "release $(VERSION)"
109 cat .git/refs/heads/master > .git/refs/tags/$(VERSION)
110 @ echo
111 git archive --format=tar --prefix=bti-$(VERSION)/ HEAD | gzip -9v > bti-$(VERSION).tar.gz
112 .PHONY: release
113

  ViewVC Help
Powered by ViewVC 1.1.26