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 arm*) echo '-O elf32-littlearm -B arm';; \
115 powerpc*) echo '-O elf32-powerpc -B powerpc';; \
119 sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
121 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
125 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
127 -e 's/\(=[^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
131 -e 's/^/--redefine-sym _binary_/' \
132 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
133 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
134 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
136 libtool: $(LIBTOOL_DEPS)
137 $(SHELL) ./config.status --recheck
140 ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \
141 ${top_srcdir}/demo/demo.jspp \
142 ${top_srcdir}/demo/favicon.ico \
143 ${top_srcdir}/demo/styles.css \
144 ${top_srcdir}/demo/print-styles.css \
145 ${top_srcdir}/demo/vt100.js \
146 ${top_srcdir}/demo/usercss-0.css \
147 ${top_srcdir}/demo/usercss-1.css \
148 ${top_srcdir}/demo/usercss-2.css \
149 ${top_srcdir}/demo/usercss-3.css
151 ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
155 ${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif
159 ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
163 ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
165 sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$<" >"$@"
167 ${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css
171 ${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css
175 ${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css
179 ${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css
183 ${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css
187 ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
191 shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
192 @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
193 echo preprocess "$$src" '>'"$@"; \
194 if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
195 egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
196 wc -l` -eq 3 ]; then \
197 sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \
199 sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \
201 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
202 grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \
203 sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \
205 sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \
207 if [ -n "${DPKGBUILD}" ]; then \
208 sed -e '/^#ifndef *DPKGBUILD$$/,/^#endif$$/d'; \
210 sed -e '/^#ifdef *DPKGBUILD$$/,/^#endif$$/d'; \
213 @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
214 man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
217 -rm -rf shellinaboxd.1 \
219 -rm -rf debian/shellinabox \
220 debian/shellinabox*.debhelper* \
221 debian/shellinabox.substvars \
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)` \
240 @echo objcopy "$<" "$@"
241 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
244 shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
247 @echo preprocess "$<" "$@"
248 @sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
252 -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
256 @echo objcopy "$<" "$@"
257 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
261 @echo objcopy "$<" "$@"
262 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \