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 EXTRA_DIST = demo/beep.wav \
27 shellinabox/shellinaboxd.man.in \
28 shellinabox/shell_in_a_box.js \
29 shellinabox/vt100.js \
37 debian/shellinabox.default \
38 debian/shellinabox.dirs \
39 debian/shellinabox.init \
40 debian/shellinabox.install \
41 debian/shellinabox.postinst \
42 debian/shellinabox.postrm
43 LIBLOGGING_INCLUDES = logging/logging.h \
45 liblogging_la_SOURCES= logging/logging.c \
46 $(LIBLOGGING_INCLUDES)
47 liblogging_la_LDFLAGS= -version 1:0:0
49 LIBHTTP_INCLUDES = libhttp/hashmap.h \
51 libhttp/httpconnection.h \
56 libhttp_la_SOURCES = libhttp/hashmap.c \
58 libhttp/httpconnection.c \
64 libhttp_la_LDFLAGS = -export-symbols $(top_srcdir)/libhttp/libhttp.sym \
67 shellinaboxd_SOURCES = shellinabox/shellinaboxd.c \
68 shellinabox/externalfile.c \
69 shellinabox/externalfile.h \
70 shellinabox/launcher.c \
71 shellinabox/launcher.h \
72 shellinabox/privileges.c \
73 shellinabox/privileges.h \
74 shellinabox/service.c \
75 shellinabox/service.h \
76 shellinabox/session.c \
77 shellinabox/session.h \
78 shellinabox/cgi_root.html \
79 shellinabox/root_page.html \
80 shellinabox/vt100.jspp \
81 shellinabox/shell_in_a_box.jspp \
82 shellinabox/styles.css \
83 shellinabox/favicon.ico \
84 shellinabox/beep.wav \
86 shellinaboxd_LDADD = liblogging.la \
88 shellinaboxd_LDFLAGS = -static
90 objcopyflags = case "$(host_cpu)" in \
91 i[0-9]86) echo '-O elf32-i386 -B i386';; \
92 x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
93 arm*) echo '-O elf32-littlearm -B arm';; \
97 sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
99 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
103 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
105 -e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
109 -e 's/^/--redefine-sym _binary_/' \
110 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
111 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
112 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
114 libtool: $(LIBTOOL_DEPS)
115 $(SHELL) ./config.status --recheck
118 ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \
119 ${top_srcdir}/demo/demo.jspp \
120 ${top_srcdir}/demo/favicon.ico \
121 ${top_srcdir}/demo/styles.css \
122 ${top_srcdir}/demo/vt100.js
124 ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
128 ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
132 ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
136 ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
140 shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
141 @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
142 echo preprocess "$$src" '>'"$@"; \
143 if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
144 egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
145 wc -l` -eq 3 ]; then \
146 sed -e '/^#ifdef *HAVE_OPENSSL$$/d' \
147 -e '/^#endif$$/d' "$$src" >"$@"; \
149 sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src" >"$@"; \
151 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
152 grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \
153 sed -e '/^#ifdef *HAVE_PAM$$/d' \
154 -e '/^#endif$$/d' "$$src" >"$@"; \
156 sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d' "$$src" >"$@"; \
158 @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
159 man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
162 -rm -rf shellinaboxd.1 \
164 -rm -rf debian/shellinabox \
165 debian/shellinabox*.debhelper* \
166 debian/shellinabox.substvars \
170 @echo objcopy "$<" "$@"
171 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
175 @echo objcopy "$<" "$@"
176 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
180 @echo objcopy "$<" "$@"
181 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
184 shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
187 @echo preprocess "$<" "$@"
188 @sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
192 -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
196 @echo objcopy "$<" "$@"
197 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
201 @echo objcopy "$<" "$@"
202 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \