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
59 LIBLOGGING_INCLUDES = logging/logging.h \
61 liblogging_la_SOURCES= logging/logging.c \
62 $(LIBLOGGING_INCLUDES)
63 liblogging_la_LDFLAGS= -version 1:0:0
65 LIBHTTP_INCLUDES = libhttp/hashmap.h \
67 libhttp/httpconnection.h \
72 libhttp_la_SOURCES = libhttp/hashmap.c \
74 libhttp/httpconnection.c \
80 libhttp_la_LDFLAGS = -export-symbols $(top_srcdir)/libhttp/libhttp.sym \
83 shellinaboxd_SOURCES = shellinabox/shellinaboxd.c \
84 shellinabox/externalfile.c \
85 shellinabox/externalfile.h \
86 shellinabox/launcher.c \
87 shellinabox/launcher.h \
88 shellinabox/privileges.c \
89 shellinabox/privileges.h \
90 shellinabox/service.c \
91 shellinabox/service.h \
92 shellinabox/session.c \
93 shellinabox/session.h \
94 shellinabox/usercss.c \
95 shellinabox/usercss.h \
96 shellinabox/cgi_root.html \
97 shellinabox/root_page.html \
98 shellinabox/vt100.jspp \
99 shellinabox/shell_in_a_box.jspp \
100 shellinabox/styles.css \
101 shellinabox/print-styles.css \
102 shellinabox/enabled.gif \
103 shellinabox/favicon.ico \
104 shellinabox/beep.wav \
106 shellinaboxd_LDADD = liblogging.la \
108 shellinaboxd_LDFLAGS = -static
110 objcopyflags = case "$(host_cpu)" in \
111 i[0-9]86) echo '-O elf32-i386 -B i386';; \
112 x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
113 arm*) echo '-O elf32-littlearm -B arm';; \
117 sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
119 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
123 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
125 -e 's/\(=[^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
129 -e 's/^/--redefine-sym _binary_/' \
130 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
131 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
132 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
134 libtool: $(LIBTOOL_DEPS)
135 $(SHELL) ./config.status --recheck
138 ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \
139 ${top_srcdir}/demo/demo.jspp \
140 ${top_srcdir}/demo/favicon.ico \
141 ${top_srcdir}/demo/styles.css \
142 ${top_srcdir}/demo/print-styles.css \
143 ${top_srcdir}/demo/vt100.js \
144 ${top_srcdir}/demo/usercss-0.css \
145 ${top_srcdir}/demo/usercss-1.css \
146 ${top_srcdir}/demo/usercss-2.css \
147 ${top_srcdir}/demo/usercss-3.css
149 ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
153 ${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif
157 ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
161 ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
163 sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$<" >"$@"
165 ${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css
169 ${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css
173 ${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css
177 ${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css
181 ${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css
185 ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
189 shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
190 @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
191 echo preprocess "$$src" '>'"$@"; \
192 if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
193 egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
194 wc -l` -eq 3 ]; then \
195 sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \
197 sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \
199 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
200 grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \
201 sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \
203 sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \
205 if [ -n "${DPKGBUILD}" ]; then \
206 sed -e '/^#ifndef *DPKGBUILD$$/,/^#endif$$/d'; \
208 sed -e '/^#ifdef *DPKGBUILD$$/,/^#endif$$/d'; \
211 @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
212 man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
215 -rm -rf shellinaboxd.1 \
217 -rm -rf debian/shellinabox \
218 debian/shellinabox*.debhelper* \
219 debian/shellinabox.substvars \
223 @echo objcopy "$<" "$@"
224 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
228 @echo objcopy "$<" "$@"
229 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
233 @echo objcopy "$<" "$@"
234 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
238 @echo objcopy "$<" "$@"
239 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
242 shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
245 @echo preprocess "$<" "$@"
246 @sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
250 -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
254 @echo objcopy "$<" "$@"
255 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
259 @echo objcopy "$<" "$@"
260 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \