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 \
63 LIBLOGGING_INCLUDES = logging/logging.h \
65 liblogging_la_SOURCES= logging/logging.c \
66 $(LIBLOGGING_INCLUDES)
67 liblogging_la_LDFLAGS= -version 1:0:0
69 LIBHTTP_INCLUDES = libhttp/hashmap.h \
71 libhttp/httpconnection.h \
76 libhttp_la_SOURCES = libhttp/hashmap.c \
78 libhttp/httpconnection.c \
84 libhttp_la_LDFLAGS = -export-symbols $(top_srcdir)/libhttp/libhttp.sym \
87 shellinaboxd_SOURCES = shellinabox/shellinaboxd.c \
88 shellinabox/externalfile.c \
89 shellinabox/externalfile.h \
90 shellinabox/launcher.c \
91 shellinabox/launcher.h \
92 shellinabox/privileges.c \
93 shellinabox/privileges.h \
94 shellinabox/service.c \
95 shellinabox/service.h \
96 shellinabox/session.c \
97 shellinabox/session.h \
98 shellinabox/usercss.c \
99 shellinabox/usercss.h \
100 shellinabox/cgi_root.html \
101 shellinabox/root_page.html \
102 shellinabox/vt100.jspp \
103 shellinabox/shell_in_a_box.jspp \
104 shellinabox/styles.css \
105 shellinabox/print-styles.css \
106 shellinabox/enabled.gif \
107 shellinabox/favicon.ico \
108 shellinabox/beep.wav \
110 shellinaboxd_LDADD = liblogging.la \
112 shellinaboxd_LDFLAGS = -static
114 objcopyflags = case "$(host_cpu)" in \
115 i[0-9]86)echo '-O elf32-i386 -B i386';; \
116 x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
117 *) trap 'rm -f /tmp/probe$$$$.o' EXIT; \
118 $(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc \
119 -o /tmp/probe$$$$.o /dev/null && \
120 $(OBJDUMP) -f /tmp/probe$$$$.o | \
121 sed -e 's/.*file format */-O /;t; \
122 s/architecture: *\([^,]*\).*/-B \1/;t; \
127 sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
129 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
133 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
135 -e 's/\(=[^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
139 -e 's/^/--redefine-sym _binary_/' \
140 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
141 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
142 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
144 libtool: $(LIBTOOL_DEPS)
145 $(SHELL) ./config.status --recheck
148 ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \
149 ${top_srcdir}/demo/demo.jspp \
150 ${top_srcdir}/demo/favicon.ico \
151 ${top_srcdir}/demo/styles.css \
152 ${top_srcdir}/demo/print-styles.css \
153 ${top_srcdir}/demo/vt100.js \
154 ${top_srcdir}/demo/usercss-0.css \
155 ${top_srcdir}/demo/usercss-1.css \
156 ${top_srcdir}/demo/usercss-2.css \
157 ${top_srcdir}/demo/usercss-3.css
159 ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
163 ${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif
167 ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
171 ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
173 sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$?" >"$@"
175 ${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css
179 ${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css
183 ${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css
187 ${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css
191 ${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css
195 ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
199 shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
200 @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
201 echo preprocess "$$src" '>'"$@"; \
202 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
203 grep 'HAVE_BIN_LOGIN' >/dev/null 2>&1; then \
204 sed -e '/^#ifndef *HAVE_BIN_LOGIN$$/,/^#endif$$/d' "$$src"; \
206 sed -e '/^#ifdef *HAVE_BIN_LOGIN$$/,/^#endif$$/d' "$$src"; \
208 if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
209 egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
210 wc -l` -eq 3 ]; then \
211 sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d'; \
213 sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d'; \
215 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
216 grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \
217 sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \
219 sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \
221 if [ -n "${DPKGBUILD}" ]; then \
222 sed -e '/^#ifndef *DPKGBUILD$$/,/^#endif$$/d'; \
224 sed -e '/^#ifdef *DPKGBUILD$$/,/^#endif$$/d'; \
227 @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
228 man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
231 -rm -rf shellinaboxd.1 \
233 -rm -rf debian/shellinabox \
234 debian/shellinabox*.debhelper* \
235 debian/shellinabox.substvars \
240 @echo $(OBJCOPY) "$<" "$@"
241 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
243 @-printf '\000' >GNU-stack && \
244 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
248 @echo $(OBJCOPY) "$<" "$@"
249 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
251 @-printf '\000' >GNU-stack && \
252 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
257 @echo $(OBJCOPY) "$<" "$@"
258 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
260 @-printf '\000' >GNU-stack && \
261 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
266 @echo $(OBJCOPY) "$<" "$@"
267 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
269 @-printf '\000' >GNU-stack && \
270 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
274 shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
277 @echo preprocess "$<" "$@"
278 @sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
282 -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
286 @echo $(OBJCOPY) "$<" "$@"
287 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
289 @-printf '\000' >GNU-stack && \
290 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
295 @echo $(OBJCOPY) "$<" "$@"
296 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
298 @-printf '\000' >GNU-stack && \
299 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \