2 AM_CFLAGS = -g -std=gnu99 -Wall
5 noinst_LTLIBRARIES = libhttp.la \
7 noinst_DATA = $(top_srcdir)/demo/demo.js
8 bin_PROGRAMS = shellinaboxd
9 man_MANS = shellinaboxd.1
10 noinst_HEADERS = libhttp/http.h
11 dist_doc_DATA = AUTHORS \
19 shellinabox/white-on-black.css \
20 shellinabox/black-on-white.css \
21 shellinabox/monochrome.css \
23 EXTRA_DIST = INSTALL.Debian \
35 demo/print-styles.css \
41 etc-pam.d-shellinabox-example \
42 shellinabox/shellinaboxd.man.in \
43 shellinabox/shell_in_a_box.js \
44 shellinabox/vt100.js \
45 shellinabox/cgi-mode-example.sh \
47 debian/README.available \
48 debian/README.enabled \
55 debian/shellinabox.default \
56 debian/shellinabox.dirs \
57 debian/shellinabox.init \
58 debian/shellinabox.install \
59 debian/shellinabox.postinst \
60 debian/shellinabox.postrm \
61 debian/source/format \
63 LIBLOGGING_INCLUDES = logging/logging.h \
65 liblogging_la_SOURCES= logging/logging.c \
66 $(LIBLOGGING_INCLUDES)
67 liblogging_la_LDFLAGS= -version 1:0:0
69 LIBHTTP_INCLUDES = libhttp/hashmap.h \
71 libhttp/httpconnection.h \
76 libhttp_la_SOURCES = libhttp/hashmap.c \
78 libhttp/httpconnection.c \
84 libhttp_la_LDFLAGS = -export-symbols $(top_srcdir)/libhttp/libhttp.sym \
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 \
98 shellinabox/usercss.c \
99 shellinabox/usercss.h \
100 shellinabox/cgi_root.html \
101 shellinabox/root_page.html \
102 shellinabox/vt100.jspp \
103 shellinabox/shell_in_a_box.jspp \
104 shellinabox/styles.css \
105 shellinabox/print-styles.css \
106 shellinabox/enabled.gif \
107 shellinabox/favicon.ico \
108 shellinabox/keyboard.png \
109 shellinabox/keyboard-layout.html \
110 shellinabox/beep.wav \
112 BUILT_SOURCES = shellinabox/beep.h \
113 shellinabox/cgi_root.h \
114 shellinabox/enabled.h \
115 shellinabox/favicon.h \
116 shellinabox/keyboard.h \
117 shellinabox/keyboard-layout.h \
118 shellinabox/print-styles.h \
119 shellinabox/root_page.h \
120 shellinabox/shell_in_a_box.h \
121 shellinabox/shell_in_a_box.js \
122 shellinabox/styles.h \
123 shellinabox/vt100.h \
127 shellinaboxd_LDADD = liblogging.la \
129 shellinaboxd_LDFLAGS = -static
132 sed -e 's/.*\/\([^.]*\)[.].*/\1/' \
134 -e 's/\([^.]*\)[.].*/\1/' \
136 -e 's/$$/ aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
138 -e 's/\([^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
143 libtool: $(LIBTOOL_DEPS)
144 $(SHELL) ./config.status --recheck
147 ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \
148 ${top_srcdir}/demo/demo.jspp \
149 ${top_srcdir}/demo/enabled.gif \
150 ${top_srcdir}/demo/favicon.ico \
151 ${top_srcdir}/demo/keyboard.html \
152 ${top_srcdir}/demo/keyboard.png \
153 ${top_srcdir}/demo/styles.css \
154 ${top_srcdir}/demo/print-styles.css \
155 ${top_srcdir}/demo/vt100.js \
156 ${top_srcdir}/demo/usercss-0.css \
157 ${top_srcdir}/demo/usercss-1.css \
158 ${top_srcdir}/demo/usercss-2.css \
159 ${top_srcdir}/demo/usercss-3.css
161 ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
165 ${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif
169 ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
173 ${top_srcdir}/demo/keyboard.html: ${top_srcdir}/shellinabox/keyboard-layout.html
177 ${top_srcdir}/demo/keyboard.png: ${top_srcdir}/shellinabox/keyboard.png
181 ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
183 sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$?" >"$@"
185 ${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css
189 ${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css
193 ${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css
197 ${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css
201 ${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css
205 ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
209 shellinaboxd.1: ${top_srcdir}/shellinabox/shellinaboxd.man.in \
210 ${top_srcdir}/config.h
211 @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
212 echo preprocess "$$src" '>'"$@"; \
213 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
214 grep 'HAVE_BIN_LOGIN' >/dev/null 2>&1; then \
215 sed -e '/^#ifndef *HAVE_BIN_LOGIN$$/,/^#endif$$/d' "$$src"; \
217 sed -e '/^#ifdef *HAVE_BIN_LOGIN$$/,/^#endif$$/d' "$$src"; \
219 if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
220 egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
221 wc -l` -eq 3 ]; then \
222 sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d'; \
224 sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d'; \
226 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
227 grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \
228 sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \
230 sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \
232 if [ -n "${DPKGBUILD}" ]; then \
233 sed -e '/^#ifndef *DPKGBUILD$$/,/^#endif$$/d'; \
235 sed -e '/^#ifdef *DPKGBUILD$$/,/^#endif$$/d'; \
238 @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
239 man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
242 -rm -rf shellinaboxd.1 \
244 -rm -rf debian/shellinabox \
245 debian/shellinabox*.debhelper* \
246 debian/shellinabox.substvars \
248 -rm -rf shellinabox/beep.h \
249 shellinabox/cgi_root.h \
250 shellinabox/enabled.h \
251 shellinabox/favicon.h \
252 shellinabox/keyboard.h \
253 shellinabox/keyboard-layout.h \
254 shellinabox/print-styles.h \
255 shellinabox/root_page.h \
256 shellinabox/shell_in_a_box.h \
257 shellinabox/styles.h \
261 @echo od "$<" '>'"$@"
262 @mkdir -p "`dirname "$@"`"
263 @{ sym="`echo "$<" | $(symbolname)`"; \
264 echo "static const char $${sym}Start[] ="; \
265 od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
267 echo "static const int $${sym}Size ATTR_UNUSED =" \
268 "(int)sizeof($${sym}Start);"; \
272 @echo od "$<" '>'"$@"
273 @mkdir -p "`dirname "$@"`"
274 @{ sym="`echo "$<" | $(symbolname)`"; \
275 echo "static const char $${sym}Start[] ="; \
276 od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
278 echo "static const int $${sym}Size ATTR_UNUSED =" \
279 "(int)sizeof($${sym}Start);"; \
283 @echo od "$<" '>'"$@"
284 @mkdir -p "`dirname "$@"`"
285 @{ sym="`echo "$<" | $(symbolname)`"; \
286 echo "static const char $${sym}Start[] ="; \
287 od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
289 echo "static const int $${sym}Size ATTR_UNUSED =" \
290 "(int)sizeof($${sym}Start);"; \
294 @echo od "$<" '>'"$@"
295 @mkdir -p "`dirname "$@"`"
296 @{ sym="`echo "$<" | $(symbolname)`"; \
297 echo "static const char $${sym}Start[] ="; \
298 od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
300 echo "static const int $${sym}Size ATTR_UNUSED =" \
301 "(int)sizeof($${sym}Start);"; \
306 @echo od "$<" '>'"$@"
307 @mkdir -p "`dirname "$@"`"
308 @{ sym="`echo "$<" | $(symbolname)`"; \
309 echo "static const char $${sym}Start[] ="; \
310 od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
312 echo "static const int $${sym}Size ATTR_UNUSED =" \
313 "(int)sizeof($${sym}Start);"; \
317 @echo preprocess "$<" "$@"
318 @mkdir -p "`dirname "$@"`"
319 sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
323 -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
327 @echo od "$<" '>'"$@"
328 @mkdir -p "`dirname "$@"`"
329 @{ sym="`echo "$<" | $(symbolname)`"; \
330 echo "static const char $${sym}Start[] ="; \
331 od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
333 echo "static const int $${sym}Size ATTR_UNUSED =" \
334 "(int)sizeof($${sym}Start);"; \
339 @echo od "$<" '>'"$@"
340 @mkdir -p "`dirname "$@"`"
341 @{ sym="`echo "$<" | $(symbolname)`"; \
342 echo "static const char $${sym}Start[] ="; \
343 od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
345 echo "static const int $${sym}Size ATTR_UNUSED =" \
346 "(int)sizeof($${sym}Start);"; \