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 = demo/beep.wav \
31 demo/print-styles.css \
37 shellinabox/shellinaboxd.man.in \
38 shellinabox/shell_in_a_box.js \
39 shellinabox/vt100.js \
40 shellinabox/cgi-mode-example.sh \
42 debian/README.available \
43 debian/README.enabled \
50 debian/shellinabox.default \
51 debian/shellinabox.dirs \
52 debian/shellinabox.init \
53 debian/shellinabox.install \
54 debian/shellinabox.postinst \
55 debian/shellinabox.postrm
56 LIBLOGGING_INCLUDES = logging/logging.h \
58 liblogging_la_SOURCES= logging/logging.c \
59 $(LIBLOGGING_INCLUDES)
60 liblogging_la_LDFLAGS= -version 1:0:0
62 LIBHTTP_INCLUDES = libhttp/hashmap.h \
64 libhttp/httpconnection.h \
69 libhttp_la_SOURCES = libhttp/hashmap.c \
71 libhttp/httpconnection.c \
77 libhttp_la_LDFLAGS = -export-symbols $(top_srcdir)/libhttp/libhttp.sym \
80 shellinaboxd_SOURCES = shellinabox/shellinaboxd.c \
81 shellinabox/externalfile.c \
82 shellinabox/externalfile.h \
83 shellinabox/launcher.c \
84 shellinabox/launcher.h \
85 shellinabox/privileges.c \
86 shellinabox/privileges.h \
87 shellinabox/service.c \
88 shellinabox/service.h \
89 shellinabox/session.c \
90 shellinabox/session.h \
91 shellinabox/usercss.c \
92 shellinabox/usercss.h \
93 shellinabox/cgi_root.html \
94 shellinabox/root_page.html \
95 shellinabox/vt100.jspp \
96 shellinabox/shell_in_a_box.jspp \
97 shellinabox/styles.css \
98 shellinabox/print-styles.css \
99 shellinabox/enabled.gif \
100 shellinabox/favicon.ico \
101 shellinabox/beep.wav \
103 shellinaboxd_LDADD = liblogging.la \
105 shellinaboxd_LDFLAGS = -static
107 objcopyflags = case "$(host_cpu)" in \
108 i[0-9]86) echo '-O elf32-i386 -B i386';; \
109 x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
110 arm*) echo '-O elf32-littlearm -B arm';; \
114 sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
116 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
120 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
122 -e 's/\(=[^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
126 -e 's/^/--redefine-sym _binary_/' \
127 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
128 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
129 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
131 libtool: $(LIBTOOL_DEPS)
132 $(SHELL) ./config.status --recheck
135 ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \
136 ${top_srcdir}/demo/demo.jspp \
137 ${top_srcdir}/demo/favicon.ico \
138 ${top_srcdir}/demo/styles.css \
139 ${top_srcdir}/demo/print-styles.css \
140 ${top_srcdir}/demo/vt100.js \
141 ${top_srcdir}/demo/usercss-0.css \
142 ${top_srcdir}/demo/usercss-1.css \
143 ${top_srcdir}/demo/usercss-2.css \
144 ${top_srcdir}/demo/usercss-3.css
146 ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
150 ${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif
154 ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
158 ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
160 sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$<" >"$@"
162 ${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css
166 ${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css
170 ${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css
174 ${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css
178 ${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css
182 ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
186 shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
187 @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
188 echo preprocess "$$src" '>'"$@"; \
189 if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
190 egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
191 wc -l` -eq 3 ]; then \
192 sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \
194 sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \
196 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
197 grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \
198 sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \
200 sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \
202 if [ -n "${DPKGBUILD}" ]; then \
203 sed -e '/^#ifndef *DPKGBUILD$$/,/^#endif$$/d'; \
205 sed -e '/^#ifdef *DPKGBUILD$$/,/^#endif$$/d'; \
208 @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
209 man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
212 -rm -rf shellinaboxd.1 \
214 -rm -rf debian/shellinabox \
215 debian/shellinabox*.debhelper* \
216 debian/shellinabox.substvars \
220 @echo objcopy "$<" "$@"
221 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
225 @echo objcopy "$<" "$@"
226 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
230 @echo objcopy "$<" "$@"
231 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
235 @echo objcopy "$<" "$@"
236 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
239 shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
242 @echo preprocess "$<" "$@"
243 @sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
247 -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
251 @echo objcopy "$<" "$@"
252 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
256 @echo objcopy "$<" "$@"
257 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \