2 AM_CFLAGS = -g -std=gnu99 -Wall -Werror -Os
5 noinst_LTLIBRARIES = libhttp.la \
7 bin_PROGRAMS = shellinaboxd
8 man_MANS = shellinaboxd.1
9 noinst_HEADERS = libhttp/http.h
10 dist_doc_DATA = AUTHORS \
18 EXTRA_DIST = shellinabox/shellinaboxd.man.in \
26 debian/shellinabox.default \
27 debian/shellinabox.dirs \
28 debian/shellinabox.init \
29 debian/shellinabox.install \
30 debian/shellinabox.postinst \
31 debian/shellinabox.postrm
32 LIBLOGGING_INCLUDES = logging/logging.h \
34 liblogging_la_SOURCES= logging/logging.c \
35 $(LIBLOGGING_INCLUDES)
36 liblogging_la_LDFLAGS= -version 1:0:0
38 LIBHTTP_INCLUDES = libhttp/hashmap.h \
40 libhttp/httpconnection.h \
45 libhttp_la_SOURCES = libhttp/hashmap.c \
47 libhttp/httpconnection.c \
53 libhttp_la_LDFLAGS = -export-symbols $(top_srcdir)/libhttp/libhttp.sym \
56 shellinaboxd_SOURCES = shellinabox/shellinaboxd.c \
57 shellinabox/externalfile.c \
58 shellinabox/externalfile.h \
59 shellinabox/launcher.c \
60 shellinabox/launcher.h \
61 shellinabox/privileges.c \
62 shellinabox/privileges.h \
63 shellinabox/service.c \
64 shellinabox/service.h \
65 shellinabox/session.c \
66 shellinabox/session.h \
67 shellinabox/cgi_root.html \
68 shellinabox/root_page.html \
69 shellinabox/vt100.js \
70 shellinabox/shell_in_a_box.js \
71 shellinabox/styles.css \
72 shellinabox/favicon.ico \
73 shellinabox/beep.wav \
75 shellinaboxd_LDADD = liblogging.la \
77 shellinaboxd_LDFLAGS = -static
79 libtool: $(LIBTOOL_DEPS)
80 $(SHELL) ./config.status --recheck
82 shellinaboxd.1: shellinabox/shellinaboxd.man.in $(top_srcdir)/config.h
83 @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
84 echo preprocess "$$src" '>'"$@"; \
85 if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d \
86 "${top_srcdir}/config.h" | \
87 egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
88 wc -l` -eq 3 ]; then \
89 sed -e '/^#ifdef *HAVE_OPENSSL$$/d' \
90 -e '/^#endif$$/d' "$$src" >"$@"; \
92 sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src" >"$@"; \
94 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d \
95 "${top_srcdir}/config.h" | \
96 grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \
97 sed -e '/^#ifdef *HAVE_PAM$$/d' \
98 -e '/^#endif$$/d' "$$src" >"$@"; \
100 sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d' "$$src" >"$@"; \
102 @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
103 man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
106 -rm -rf shellinaboxd.1 \
108 -rm -rf debian/shellinabox \
109 debian/shellinabox*.debhelper* \
110 debian/shellinabox.substvars \
114 @$(ECHO) objcopy "$<" "$@"
116 -I binary `echo "$(host_cpu)" | \
117 grep -q '^i[0-9]86$$' && \
118 echo ' -O elf32-i386 -B i386' || \
119 echo ' -O elf64-x86-64 -B i386:x86-64'` \
121 -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
123 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
127 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
129 -e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
133 -e 's/^/--redefine-sym _binary_/' \
134 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
135 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
136 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
140 @$(ECHO) objcopy "$<" "$@"
142 -I binary `echo "$(host_cpu)" | \
143 grep -q '^i[0-9]86$$' && \
144 echo ' -O elf32-i386 -B i386' || \
145 echo ' -O elf64-x86-64 -B i386:x86-64'` \
147 -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
149 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
153 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
155 -e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
159 -e 's/^/--redefine-sym _binary_/' \
160 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
161 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
162 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
166 @$(ECHO) objcopy "$<" "$@"
168 -I binary `echo "$(host_cpu)" | \
169 grep -q '^i[0-9]86$$' && \
170 echo ' -O elf32-i386 -B i386' || \
171 echo ' -O elf64-x86-64 -B i386:x86-64'` \
173 -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
175 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
179 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
181 -e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
185 -e 's/^/--redefine-sym _binary_/' \
186 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
187 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
188 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
192 @$(ECHO) preprocess "$<" \| objcopy "$@"
193 @trap 'rm -f "$@.pre"' EXIT INT TERM QUIT; \
194 sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
198 -e "s/VERSION/\"@VERSION@\"/g" "$<" >"$@.pre" && \
200 -I binary `echo $(host_cpu) | \
201 grep -q '^i[0-9]86$$' && \
202 echo ' -O elf32-i386 -B i386' || \
203 echo ' -O elf64-x86-64 -B i386:x86-64'` \
205 -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
207 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
211 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
213 -e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
217 -e 's/^/--redefine-sym _binary_/' \
218 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_pre_end\2End/' \
219 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_pre_start\2Start/' \
220 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_pre_size/'` \
224 @$(ECHO) objcopy "$<" "$@"
226 -I binary `echo "$(host_cpu)" | \
227 grep -q '^i[0-9]86$$' && \
228 echo ' -O elf32-i386 -B i386' || \
229 echo ' -O elf64-x86-64 -B i386:x86-64'` \
231 -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
233 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
237 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
239 -e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
243 -e 's/^/--redefine-sym _binary_/' \
244 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
245 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
246 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \