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 \
33 demo/print-styles.css \
39 etc-pam.d-shellinabox-example \
40 shellinabox/shellinaboxd.man.in \
41 shellinabox/shell_in_a_box.js \
42 shellinabox/vt100.js \
43 shellinabox/cgi-mode-example.sh \
45 debian/README.available \
46 debian/README.enabled \
53 debian/shellinabox.default \
54 debian/shellinabox.dirs \
55 debian/shellinabox.init \
56 debian/shellinabox.install \
57 debian/shellinabox.postinst \
58 debian/shellinabox.postrm \
60 LIBLOGGING_INCLUDES = logging/logging.h \
62 liblogging_la_SOURCES= logging/logging.c \
63 $(LIBLOGGING_INCLUDES)
64 liblogging_la_LDFLAGS= -version 1:0:0
66 LIBHTTP_INCLUDES = libhttp/hashmap.h \
68 libhttp/httpconnection.h \
73 libhttp_la_SOURCES = libhttp/hashmap.c \
75 libhttp/httpconnection.c \
81 libhttp_la_LDFLAGS = -export-symbols $(top_srcdir)/libhttp/libhttp.sym \
84 shellinaboxd_SOURCES = shellinabox/shellinaboxd.c \
85 shellinabox/externalfile.c \
86 shellinabox/externalfile.h \
87 shellinabox/launcher.c \
88 shellinabox/launcher.h \
89 shellinabox/privileges.c \
90 shellinabox/privileges.h \
91 shellinabox/service.c \
92 shellinabox/service.h \
93 shellinabox/session.c \
94 shellinabox/session.h \
95 shellinabox/usercss.c \
96 shellinabox/usercss.h \
97 shellinabox/cgi_root.html \
98 shellinabox/root_page.html \
99 shellinabox/vt100.jspp \
100 shellinabox/shell_in_a_box.jspp \
101 shellinabox/styles.css \
102 shellinabox/print-styles.css \
103 shellinabox/enabled.gif \
104 shellinabox/favicon.ico \
105 shellinabox/beep.wav \
107 shellinaboxd_LDADD = liblogging.la \
109 shellinaboxd_LDFLAGS = -static
111 objcopyflags = case "$(host_cpu)" in \
112 i[0-9]86) echo '-O elf32-i386 -B i386';; \
113 x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
114 *) trap 'rm -f /tmp/probe$$$$.o' EXIT; \
115 $(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc \
116 -o /tmp/probe$$$$.o /dev/null && \
117 objdump -f /tmp/probe$$$$.o | \
118 sed -e 's/.*file format */-O /;t; \
119 s/architecture: *\([^,]*\).*/-B \1/;t;\
124 sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
126 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
130 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
132 -e 's/\(=[^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
136 -e 's/^/--redefine-sym _binary_/' \
137 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
138 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
139 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
141 libtool: $(LIBTOOL_DEPS)
142 $(SHELL) ./config.status --recheck
145 ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \
146 ${top_srcdir}/demo/demo.jspp \
147 ${top_srcdir}/demo/favicon.ico \
148 ${top_srcdir}/demo/styles.css \
149 ${top_srcdir}/demo/print-styles.css \
150 ${top_srcdir}/demo/vt100.js \
151 ${top_srcdir}/demo/usercss-0.css \
152 ${top_srcdir}/demo/usercss-1.css \
153 ${top_srcdir}/demo/usercss-2.css \
154 ${top_srcdir}/demo/usercss-3.css
156 ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
160 ${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif
164 ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
168 ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
170 sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$<" >"$@"
172 ${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css
176 ${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css
180 ${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css
184 ${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css
188 ${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css
192 ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
196 shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
197 @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
198 echo preprocess "$$src" '>'"$@"; \
199 if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
200 egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
201 wc -l` -eq 3 ]; then \
202 sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \
204 sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \
206 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
207 grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \
208 sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \
210 sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \
212 if [ -n "${DPKGBUILD}" ]; then \
213 sed -e '/^#ifndef *DPKGBUILD$$/,/^#endif$$/d'; \
215 sed -e '/^#ifdef *DPKGBUILD$$/,/^#endif$$/d'; \
218 @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
219 man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
222 -rm -rf shellinaboxd.1 \
224 -rm -rf debian/shellinabox \
225 debian/shellinabox*.debhelper* \
226 debian/shellinabox.substvars \
230 @echo objcopy "$<" "$@"
231 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
235 @echo objcopy "$<" "$@"
236 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
240 @echo objcopy "$<" "$@"
241 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
245 @echo objcopy "$<" "$@"
246 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
249 shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
252 @echo preprocess "$<" "$@"
253 @sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
257 -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
261 @echo objcopy "$<" "$@"
262 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
266 @echo objcopy "$<" "$@"
267 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \