]>
Commit | Line | Data |
---|---|---|
7460295f | 1 | AM_CPPFLAGS = |
c593cf68 | 2 | AM_CFLAGS = -g -std=gnu99 -Wall |
3bf14b3a | 3 | AM_LDFLAGS = -g -lm |
7460295f | 4 | |
bc83b450 | 5 | OBJCOPY ?= objcopy |
59edd9ef | 6 | OBJDUMP ?= objdump |
bc83b450 | 7 | |
7460295f MG |
8 | noinst_LTLIBRARIES = libhttp.la \ |
9 | liblogging.la | |
c593cf68 | 10 | noinst_DATA = $(top_srcdir)/demo/demo.js |
7460295f MG |
11 | bin_PROGRAMS = shellinaboxd |
12 | man_MANS = shellinaboxd.1 | |
13 | noinst_HEADERS = libhttp/http.h | |
14 | dist_doc_DATA = AUTHORS \ | |
15 | COPYING \ | |
16 | GPL-2 \ | |
17 | ChangeLog \ | |
18 | INSTALL \ | |
19 | NEWS \ | |
20 | README \ | |
1f771613 | 21 | TODO \ |
08db8657 MG |
22 | shellinabox/white-on-black.css \ |
23 | shellinabox/black-on-white.css \ | |
24 | shellinabox/monochrome.css \ | |
25 | shellinabox/color.css | |
09c5d6e3 MG |
26 | EXTRA_DIST = INSTALL.Debian \ |
27 | README.Fedora \ | |
28 | demo/beep.wav \ | |
c593cf68 MG |
29 | demo/favicon.ico \ |
30 | demo/demo.html \ | |
31 | demo/demo.js \ | |
32 | demo/demo.jspp \ | |
c82a11e7 | 33 | demo/demo.xml \ |
08db8657 | 34 | demo/enabled.gif \ |
c593cf68 | 35 | demo/styles.css \ |
db50e572 | 36 | demo/print-styles.css \ |
c593cf68 | 37 | demo/vt100.js \ |
08db8657 MG |
38 | demo/usercss-0.css \ |
39 | demo/usercss-1.css \ | |
40 | demo/usercss-2.css \ | |
41 | demo/usercss-3.css \ | |
09c5d6e3 | 42 | etc-pam.d-shellinabox-example \ |
c593cf68 | 43 | shellinabox/shellinaboxd.man.in \ |
c27d0db9 MG |
44 | shellinabox/shell_in_a_box.js \ |
45 | shellinabox/vt100.js \ | |
fd239d93 | 46 | shellinabox/cgi-mode-example.sh \ |
7460295f | 47 | debian/README \ |
e7372536 MG |
48 | debian/README.available \ |
49 | debian/README.enabled \ | |
7460295f MG |
50 | debian/changelog \ |
51 | debian/compat \ | |
52 | debian/control \ | |
53 | debian/copyright \ | |
54 | debian/docs \ | |
55 | debian/rules \ | |
56 | debian/shellinabox.default \ | |
57 | debian/shellinabox.dirs \ | |
58 | debian/shellinabox.init \ | |
59 | debian/shellinabox.install \ | |
60 | debian/shellinabox.postinst \ | |
f77e8221 MG |
61 | debian/shellinabox.postrm \ |
62 | debian/watch | |
bdd01e84 MG |
63 | LIBLOGGING_INCLUDES = logging/logging.h \ |
64 | config.h | |
7460295f MG |
65 | liblogging_la_SOURCES= logging/logging.c \ |
66 | $(LIBLOGGING_INCLUDES) | |
67 | liblogging_la_LDFLAGS= -version 1:0:0 | |
68 | ||
69 | LIBHTTP_INCLUDES = libhttp/hashmap.h \ | |
70 | libhttp/trie.h \ | |
71 | libhttp/httpconnection.h \ | |
72 | libhttp/server.h \ | |
73 | libhttp/ssl.h \ | |
bdd01e84 MG |
74 | libhttp/url.h \ |
75 | config.h | |
7460295f MG |
76 | libhttp_la_SOURCES = libhttp/hashmap.c \ |
77 | libhttp/trie.c \ | |
78 | libhttp/httpconnection.c \ | |
79 | libhttp/server.c \ | |
80 | libhttp/ssl.c \ | |
81 | libhttp/url.c \ | |
82 | $(LIBHTTP_INCLUDES) \ | |
83 | libhttp/libhttp.sym | |
84 | libhttp_la_LDFLAGS = -export-symbols $(top_srcdir)/libhttp/libhttp.sym \ | |
29135474 | 85 | -version 1:0:0 |
7460295f MG |
86 | |
87 | shellinaboxd_SOURCES = shellinabox/shellinaboxd.c \ | |
88 | shellinabox/externalfile.c \ | |
89 | shellinabox/externalfile.h \ | |
90 | shellinabox/launcher.c \ | |
91 | shellinabox/launcher.h \ | |
92 | shellinabox/privileges.c \ | |
93 | shellinabox/privileges.h \ | |
94 | shellinabox/service.c \ | |
95 | shellinabox/service.h \ | |
96 | shellinabox/session.c \ | |
97 | shellinabox/session.h \ | |
ecbff9b9 MG |
98 | shellinabox/usercss.c \ |
99 | shellinabox/usercss.h \ | |
d1edcc0e | 100 | shellinabox/cgi_root.html \ |
7460295f | 101 | shellinabox/root_page.html \ |
c27d0db9 MG |
102 | shellinabox/vt100.jspp \ |
103 | shellinabox/shell_in_a_box.jspp \ | |
7460295f | 104 | shellinabox/styles.css \ |
db50e572 | 105 | shellinabox/print-styles.css \ |
08db8657 | 106 | shellinabox/enabled.gif \ |
7460295f | 107 | shellinabox/favicon.ico \ |
bdd01e84 MG |
108 | shellinabox/beep.wav \ |
109 | config.h | |
7460295f MG |
110 | shellinaboxd_LDADD = liblogging.la \ |
111 | libhttp.la | |
29135474 | 112 | shellinaboxd_LDFLAGS = -static |
7460295f | 113 | |
1a29881f | 114 | objcopyflags = case "$(host_cpu)" in \ |
8bde68b8 MG |
115 | i[0-9]86)echo '-O elf32-i386 -B i386';; \ |
116 | x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \ | |
8bde68b8 MG |
117 | *) trap 'rm -f /tmp/probe$$$$.o' EXIT; \ |
118 | $(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc \ | |
119 | -o /tmp/probe$$$$.o /dev/null && \ | |
59edd9ef | 120 | $(OBJDUMP) -f /tmp/probe$$$$.o | \ |
8bde68b8 MG |
121 | sed -e 's/.*file format */-O /;t; \ |
122 | s/architecture: *\([^,]*\).*/-B \1/;t; \ | |
123 | d';; \ | |
1a29881f MG |
124 | esac |
125 | ||
126 | renamesymbols = \ | |
127 | sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \ | |
128 | -e 't0' \ | |
129 | -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \ | |
130 | -e 't0' \ | |
131 | -e 's/.*/&=& /' \ | |
132 | -e ':0' \ | |
133 | -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \ | |
134 | -e ':1' \ | |
db50e572 | 135 | -e 's/\(=[^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \ |
1a29881f MG |
136 | -e 't1' \ |
137 | -e 's/.\{53\}$$//' \ | |
db50e572 | 138 | -e 's/[-/.]/_/g' \ |
1a29881f MG |
139 | -e 's/^/--redefine-sym _binary_/' \ |
140 | -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \ | |
141 | -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \ | |
142 | -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/' | |
143 | ||
7460295f MG |
144 | libtool: $(LIBTOOL_DEPS) |
145 | $(SHELL) ./config.status --recheck | |
146 | ||
5d21b406 MG |
147 | |
148 | ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \ | |
149 | ${top_srcdir}/demo/demo.jspp \ | |
150 | ${top_srcdir}/demo/favicon.ico \ | |
151 | ${top_srcdir}/demo/styles.css \ | |
db50e572 | 152 | ${top_srcdir}/demo/print-styles.css \ |
08db8657 MG |
153 | ${top_srcdir}/demo/vt100.js \ |
154 | ${top_srcdir}/demo/usercss-0.css \ | |
155 | ${top_srcdir}/demo/usercss-1.css \ | |
156 | ${top_srcdir}/demo/usercss-2.css \ | |
157 | ${top_srcdir}/demo/usercss-3.css | |
5d21b406 MG |
158 | |
159 | ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav | |
160 | @rm -f "$@" | |
dac74dcd | 161 | ln "$?" "$@" |
5d21b406 | 162 | |
08db8657 MG |
163 | ${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif |
164 | @rm -f "$@" | |
dac74dcd | 165 | ln "$?" "$@" |
08db8657 | 166 | |
5d21b406 MG |
167 | ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico |
168 | @rm -f "$@" | |
dac74dcd | 169 | ln "$?" "$@" |
5d21b406 MG |
170 | |
171 | ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css | |
172 | @rm -f "$@" | |
dac74dcd | 173 | sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$?" >"$@" |
5d21b406 | 174 | |
db50e572 MG |
175 | ${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css |
176 | @rm -f "$@" | |
dac74dcd | 177 | ln "$?" "$@" |
db50e572 | 178 | |
08db8657 MG |
179 | ${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css |
180 | @rm -f "$@" | |
dac74dcd | 181 | ln "$?" "$@" |
08db8657 MG |
182 | |
183 | ${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css | |
184 | @rm -f "$@" | |
dac74dcd | 185 | ln "$?" "$@" |
08db8657 MG |
186 | |
187 | ${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css | |
188 | @rm -f "$@" | |
dac74dcd | 189 | ln "$?" "$@" |
08db8657 MG |
190 | |
191 | ${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css | |
192 | @rm -f "$@" | |
dac74dcd | 193 | ln "$?" "$@" |
08db8657 | 194 | |
5d21b406 MG |
195 | ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js |
196 | @rm -f "$@" | |
dac74dcd | 197 | ln "$?" "$@" |
5d21b406 | 198 | |
c27d0db9 | 199 | shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h |
29135474 MG |
200 | @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \ |
201 | echo preprocess "$$src" '>'"$@"; \ | |
2eb60237 MG |
202 | if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \ |
203 | grep 'HAVE_BIN_LOGIN' >/dev/null 2>&1; then \ | |
204 | sed -e '/^#ifndef *HAVE_BIN_LOGIN$$/,/^#endif$$/d' "$$src"; \ | |
205 | else \ | |
206 | sed -e '/^#ifdef *HAVE_BIN_LOGIN$$/,/^#endif$$/d' "$$src"; \ | |
207 | fi | \ | |
c27d0db9 | 208 | if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \ |
bf1ec4d2 MG |
209 | egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\ |
210 | wc -l` -eq 3 ]; then \ | |
2eb60237 | 211 | sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d'; \ |
29135474 | 212 | else \ |
2eb60237 | 213 | sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d'; \ |
2809cd15 | 214 | fi | \ |
c27d0db9 | 215 | if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \ |
bf1ec4d2 | 216 | grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \ |
2809cd15 | 217 | sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \ |
bf1ec4d2 | 218 | else \ |
2809cd15 MG |
219 | sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \ |
220 | fi | \ | |
1f771613 MG |
221 | if [ -n "${DPKGBUILD}" ]; then \ |
222 | sed -e '/^#ifndef *DPKGBUILD$$/,/^#endif$$/d'; \ | |
223 | else \ | |
224 | sed -e '/^#ifdef *DPKGBUILD$$/,/^#endif$$/d'; \ | |
225 | fi | \ | |
2809cd15 | 226 | sed -e '/^#/d' >"$@" |
bf1ec4d2 MG |
227 | @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \ |
228 | man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}" | |
7460295f MG |
229 | |
230 | clean-local: | |
231 | -rm -rf shellinaboxd.1 \ | |
2837d5e3 | 232 | shellinaboxd.ps |
7460295f | 233 | -rm -rf debian/shellinabox \ |
2837d5e3 | 234 | debian/shellinabox*.debhelper* \ |
7460295f | 235 | debian/shellinabox.substvars \ |
2837d5e3 MG |
236 | debian/tmp |
237 | -rm -rf GNU-stack | |
7460295f MG |
238 | |
239 | .css.o: | |
bc83b450 MG |
240 | @echo $(OBJCOPY) "$<" "$@" |
241 | @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\ | |
08db8657 | 242 | "$<" "$@" |
2837d5e3 | 243 | @-printf '\000' >GNU-stack && \ |
bc83b450 | 244 | $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \ |
2837d5e3 | 245 | rm -f GNU-stack |
08db8657 MG |
246 | |
247 | .gif.o: | |
bc83b450 MG |
248 | @echo $(OBJCOPY) "$<" "$@" |
249 | @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\ | |
7460295f | 250 | "$<" "$@" |
2837d5e3 | 251 | @-printf '\000' >GNU-stack && \ |
bc83b450 | 252 | $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \ |
2837d5e3 MG |
253 | rm -f GNU-stack |
254 | ||
7460295f MG |
255 | |
256 | .html.o: | |
bc83b450 MG |
257 | @echo $(OBJCOPY) "$<" "$@" |
258 | @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\ | |
7460295f | 259 | "$<" "$@" |
2837d5e3 | 260 | @-printf '\000' >GNU-stack && \ |
bc83b450 | 261 | $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \ |
2837d5e3 MG |
262 | rm -f GNU-stack |
263 | ||
7460295f MG |
264 | |
265 | .ico.o: | |
bc83b450 MG |
266 | @echo $(OBJCOPY) "$<" "$@" |
267 | @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\ | |
7460295f | 268 | "$<" "$@" |
2837d5e3 | 269 | @-printf '\000' >GNU-stack && \ |
bc83b450 | 270 | $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \ |
2837d5e3 MG |
271 | rm -f GNU-stack |
272 | ||
7460295f | 273 | |
3b5fc7f9 MG |
274 | shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h |
275 | ||
c27d0db9 | 276 | .jspp.js: |
572ac014 | 277 | @echo preprocess "$<" "$@" |
c27d0db9 | 278 | @sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \ |
29135474 MG |
279 | -e t \ |
280 | -e d "$<"`" \ | |
281 | -e "s/^#/\/\/ #/" \ | |
fe338aa8 | 282 | -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \ |
1a29881f | 283 | "$<" >"$@" |
c27d0db9 MG |
284 | |
285 | .js.o: | |
bc83b450 MG |
286 | @echo $(OBJCOPY) "$<" "$@" |
287 | @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\ | |
c27d0db9 | 288 | "$<" "$@" |
2837d5e3 | 289 | @-printf '\000' >GNU-stack && \ |
bc83b450 | 290 | $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \ |
2837d5e3 MG |
291 | rm -f GNU-stack |
292 | ||
7460295f MG |
293 | |
294 | .wav.o: | |
bc83b450 MG |
295 | @echo $(OBJCOPY) "$<" "$@" |
296 | @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\ | |
7460295f | 297 | "$<" "$@" |
2837d5e3 | 298 | @-printf '\000' >GNU-stack && \ |
bc83b450 | 299 | $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \ |
2837d5e3 MG |
300 | rm -f GNU-stack |
301 | ||
7460295f | 302 |