"Fossies" - the Fresh Open Source Software Archive 
Member "HTTPing-2.9/Makefile" (29 Oct 2022, 4100 Bytes) of package /linux/www/HTTPing-2.9.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 # The GPL applies to this program.
2 # In addition, as a special exception, the copyright holders give
3 # permission to link the code of portions of this program with the
4 # OpenSSL library under certain conditions as described in each
5 # individual source file, and distribute linked combinations
6 # including the two.
7 # You must obey the GNU General Public License in all respects
8 # for all of the code used other than OpenSSL. If you modify
9 # file(s) with this exception, you may extend this exception to your
10 # version of the file(s), but you are not obligated to do so. If you
11 # do not wish to do so, delete this exception statement from your
12 # version. If you delete this exception statement from all source
13 # files in the program, then also delete it here.
14
15 -include makefile.inc
16
17 # *** configure script ***
18 # support for tcp fast open?
19 #TFO=yes
20 # disable SSL? (no = disable so the default is use openssl)
21 # SSL=no
22 # enable NCURSES interface?
23 #NC=yes
24 # do fft in ncurses interface? (requires libfftw3)
25 #FW=yes
26
27 ############# do not change anything below here #############
28
29 include version
30
31 TARGET=httping
32
33 LOCALEDIR=/usr/share/locale
34
35 DEBUG=yes
36 WFLAGS=-Wall -W -Wextra -pedantic -D_FORTIFY_SOURCE=2
37 OFLAGS=
38 CFLAGS+=$(WFLAGS) $(OFLAGS) -DVERSION=\"$(VERSION)\" -DLOCALEDIR=\"$(LOCALEDIR)\"
39 LDFLAGS+=-lm
40
41 PACKAGE=$(TARGET)-$(VERSION)
42 PREFIX?=/usr
43 BINDIR=$(PREFIX)/bin
44 MANDIR=$(PREFIX)/share/man
45 DOCDIR=$(PREFIX)/share/doc/$(TARGET)
46
47 INSTALL=install
48 INSTALLDIR=$(INSTALL) -m 0755 -d
49 INSTALLBIN=$(INSTALL) -m 0755
50 INSTALLMAN=$(INSTALL) -m 0644
51 INSTALLDOC=$(INSTALL) -m 0644
52 STRIP=/usr/bin/strip
53 RMDIR=/bin/rm -rf
54 MKDIR=/bin/mkdir
55 ARCHIVE=/bin/tar cf -
56 COMPRESS=/bin/gzip -9
57
58 ifneq ($(NO_GETTEXT),yes)
59 TRANSLATIONS=nl.mo ru.mo
60 endif
61
62 OBJS=gen.o http.o io.o error.o utils.o main.o tcp.o res.o socks5.o kalman.o cookies.o help.o colors.o
63
64 MAN_EN=httping.1
65 MAN_NL=httping-nl.1
66 MAN_RU=httping-ru.1
67
68 DOCS=README.md LICENSE
69
70 ifeq ($(SSL),no)
71 CFLAGS+=-DNO_SSL
72 else
73 OBJS+=mssl.o
74 LDFLAGS+=-lssl -lcrypto
75 endif
76
77 ifeq ($(TFO),yes)
78 CFLAGS+=-DTCP_TFO
79 endif
80
81 ifeq ($(NC),yes)
82 CFLAGS+=-DNC
83 OBJS+=nc.o
84 LDFLAGS+=-lncursesw
85 endif
86
87 ifeq ($(FW),yes)
88 CFLAGS+=-DFW
89 OBJS+=fft.o
90 LDFLAGS+=-lfftw3
91 endif
92
93 ifeq ($(DEBUG),yes)
94 CFLAGS+=-D_DEBUG -ggdb
95 LDFLAGS+=-g
96 endif
97
98 ifeq ($(ARM),yes)
99 CC=arm-linux-gcc
100 endif
101
102 all: $(TARGET) $(TRANSLATIONS)
103
104 $(TARGET): $(OBJS)
105 $(CC) $(WFLAGS) $(OBJS) $(LDFLAGS) -o $(TARGET)
106 #
107 # Oh, blatant plug: http://www.vanheusden.com/wishlist.php
108
109 install: $(TARGET) $(TRANSLATIONS)
110 $(INSTALLDIR) $(DESTDIR)/$(BINDIR)
111 $(INSTALLBIN) $(TARGET) $(DESTDIR)/$(BINDIR)
112 $(INSTALLDIR) $(DESTDIR)/$(MANDIR)/man1
113 $(INSTALLMAN) $(MAN_EN) $(DESTDIR)/$(MANDIR)/man1
114 $(INSTALLDIR) $(DESTDIR)/$(MANDIR)/nl/man1
115 $(INSTALLMAN) $(MAN_NL) $(DESTDIR)/$(MANDIR)/nl/man1
116 $(INSTALLDIR) $(DESTDIR)/$(MANDIR)/ru/man1
117 $(INSTALLMAN) $(MAN_RU) $(DESTDIR)/$(MANDIR)/ru/man1
118 $(INSTALLDIR) $(DESTDIR)/$(DOCDIR)
119 $(INSTALLDOC) $(DOCS) $(DESTDIR)/$(DOCDIR)
120 ifneq ($(DEBUG),yes)
121 $(STRIP) $(DESTDIR)/$(BINDIR)/$(TARGET)
122 endif
123 ifneq ($(NO_GETTEXT),yes)
124 mkdir -p $(DESTDIR)/$(PREFIX)/share/locale/nl/LC_MESSAGES
125 cp nl.mo $(DESTDIR)/$(PREFIX)/share/locale/nl/LC_MESSAGES/httping.mo
126 mkdir -p $(DESTDIR)/$(PREFIX)/share/locale/ru/LC_MESSAGES
127 cp ru.mo $(DESTDIR)/$(PREFIX)/share/locale/ru/LC_MESSAGES/httping.mo
128 endif
129
130
131 makefile.inc:
132 ./configure
133
134 nl.mo: nl.po
135 msgfmt -o nl.mo nl.po
136 ru.mo: ru.po
137 msgfmt -o ru.mo ru.po
138
139
140 clean:
141 $(RMDIR) $(OBJS) $(TARGET) *~ core cov-int *.mo
142
143 distclean: clean
144 rm -f makefile.inc
145
146 package:
147 # source package
148 $(RMDIR) $(PACKAGE)*
149 $(MKDIR) $(PACKAGE)
150 $(INSTALLDOC) *.c *.h configure Makefile *.po version $(MAN_EN) $(MAN_NL) $(MAN_RU) $(DOCS) $(PACKAGE)
151 $(INSTALLBIN) configure $(PACKAGE)
152 $(ARCHIVE) $(PACKAGE) | $(COMPRESS) > $(PACKAGE).tgz
153 $(RMDIR) $(PACKAGE)
154
155 check: makefile.inc
156 cppcheck -v --force -j 3 --enable=all --std=c++11 --inconclusive -I. . 2> err.txt
157 #
158 make clean
159 scan-build make
160
161 coverity: makefile.inc
162 make clean
163 rm -rf cov-int
164 CC=gcc cov-build --dir cov-int make all
165 tar vczf ~/site/coverity/httping.tgz README cov-int/
166 putsite -q
167 /home/folkert/.coverity-hp.sh