2 AM_CFLAGS = -g -std=gnu99 -Wall
8 noinst_LTLIBRARIES = libhttp.la \
10 noinst_DATA = $(top_srcdir)/demo/demo.js
11 bin_PROGRAMS = shellinaboxd
12 man_MANS = shellinaboxd.1
13 noinst_HEADERS = libhttp/http.h
14 dist_doc_DATA = AUTHORS \
22 shellinabox/white-on-black.css \
23 shellinabox/black-on-white.css \
24 shellinabox/monochrome.css \
26 EXTRA_DIST = INSTALL.Debian \
36 demo/print-styles.css \
42 etc-pam.d-shellinabox-example \
43 shellinabox/shellinaboxd.man.in \
44 shellinabox/shell_in_a_box.js \
45 shellinabox/vt100.js \
46 shellinabox/cgi-mode-example.sh \
48 debian/README.available \
49 debian/README.enabled \
56 debian/shellinabox.default \
57 debian/shellinabox.dirs \
58 debian/shellinabox.init \
59 debian/shellinabox.install \
60 debian/shellinabox.postinst \
61 debian/shellinabox.postrm \
62 debian/source/format \
64 LIBLOGGING_INCLUDES = logging/logging.h \
66 liblogging_la_SOURCES= logging/logging.c \
67 $(LIBLOGGING_INCLUDES)
68 liblogging_la_LDFLAGS= -version 1:0:0
70 LIBHTTP_INCLUDES = libhttp/hashmap.h \
72 libhttp/httpconnection.h \
77 libhttp_la_SOURCES = libhttp/hashmap.c \
79 libhttp/httpconnection.c \
85 libhttp_la_LDFLAGS = -export-symbols $(top_srcdir)/libhttp/libhttp.sym \
88 shellinaboxd_SOURCES = shellinabox/shellinaboxd.c \
89 shellinabox/externalfile.c \
90 shellinabox/externalfile.h \
91 shellinabox/launcher.c \
92 shellinabox/launcher.h \
93 shellinabox/privileges.c \
94 shellinabox/privileges.h \
95 shellinabox/service.c \
96 shellinabox/service.h \
97 shellinabox/session.c \
98 shellinabox/session.h \
99 shellinabox/usercss.c \
100 shellinabox/usercss.h \
101 shellinabox/cgi_root.html \
102 shellinabox/root_page.html \
103 shellinabox/vt100.jspp \
104 shellinabox/shell_in_a_box.jspp \
105 shellinabox/styles.css \
106 shellinabox/print-styles.css \
107 shellinabox/enabled.gif \
108 shellinabox/favicon.ico \
109 shellinabox/beep.wav \
111 shellinaboxd_LDADD = liblogging.la \
113 shellinaboxd_LDFLAGS = -static
115 objcopyflags = case "$(host_cpu)" in \
116 i[0-9]86)echo '-O elf32-i386 -B i386';; \
117 x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
118 *) trap 'rm -f /tmp/probe$$$$.o' EXIT; \
119 $(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc \
120 -o /tmp/probe$$$$.o /dev/null && \
121 $(OBJDUMP) -f /tmp/probe$$$$.o | \
122 sed -e 's/.*file format */-O /;t; \
123 s/architecture: *\([^,]*\).*/-B \1/;t; \
128 sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
130 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
134 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
136 -e 's/\(=[^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
140 -e 's/^/--redefine-sym _binary_/' \
141 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
142 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
143 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
145 libtool: $(LIBTOOL_DEPS)
146 $(SHELL) ./config.status --recheck
149 ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \
150 ${top_srcdir}/demo/demo.jspp \
151 ${top_srcdir}/demo/favicon.ico \
152 ${top_srcdir}/demo/styles.css \
153 ${top_srcdir}/demo/print-styles.css \
154 ${top_srcdir}/demo/vt100.js \
155 ${top_srcdir}/demo/usercss-0.css \
156 ${top_srcdir}/demo/usercss-1.css \
157 ${top_srcdir}/demo/usercss-2.css \
158 ${top_srcdir}/demo/usercss-3.css
160 ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
164 ${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif
168 ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
172 ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
174 sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$?" >"$@"
176 ${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css
180 ${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css
184 ${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css
188 ${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css
192 ${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css
196 ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
200 shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
201 @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
202 echo preprocess "$$src" '>'"$@"; \
203 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
204 grep 'HAVE_BIN_LOGIN' >/dev/null 2>&1; then \
205 sed -e '/^#ifndef *HAVE_BIN_LOGIN$$/,/^#endif$$/d' "$$src"; \
207 sed -e '/^#ifdef *HAVE_BIN_LOGIN$$/,/^#endif$$/d' "$$src"; \
209 if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
210 egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
211 wc -l` -eq 3 ]; then \
212 sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d'; \
214 sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d'; \
216 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
217 grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \
218 sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \
220 sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \
222 if [ -n "${DPKGBUILD}" ]; then \
223 sed -e '/^#ifndef *DPKGBUILD$$/,/^#endif$$/d'; \
225 sed -e '/^#ifdef *DPKGBUILD$$/,/^#endif$$/d'; \
228 @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
229 man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
232 -rm -rf shellinaboxd.1 \
234 -rm -rf debian/shellinabox \
235 debian/shellinabox*.debhelper* \
236 debian/shellinabox.substvars \
241 @echo $(OBJCOPY) "$<" "$@"
242 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
244 @-printf '\000' >GNU-stack && \
245 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
249 @echo $(OBJCOPY) "$<" "$@"
250 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
252 @-printf '\000' >GNU-stack && \
253 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
258 @echo $(OBJCOPY) "$<" "$@"
259 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
261 @-printf '\000' >GNU-stack && \
262 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
267 @echo $(OBJCOPY) "$<" "$@"
268 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
270 @-printf '\000' >GNU-stack && \
271 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
275 shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
278 @echo preprocess "$<" "$@"
279 @sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
283 -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
287 @echo $(OBJCOPY) "$<" "$@"
288 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
290 @-printf '\000' >GNU-stack && \
291 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
296 @echo $(OBJCOPY) "$<" "$@"
297 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
299 @-printf '\000' >GNU-stack && \
300 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \