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 EXTRA_DIST = demo/beep.wav \
28 shellinabox/shellinaboxd.man.in \
29 shellinabox/shell_in_a_box.js \
30 shellinabox/vt100.js \
38 debian/shellinabox.default \
39 debian/shellinabox.dirs \
40 debian/shellinabox.init \
41 debian/shellinabox.install \
42 debian/shellinabox.postinst \
43 debian/shellinabox.postrm
44 LIBLOGGING_INCLUDES = logging/logging.h \
46 liblogging_la_SOURCES= logging/logging.c \
47 $(LIBLOGGING_INCLUDES)
48 liblogging_la_LDFLAGS= -version 1:0:0
50 LIBHTTP_INCLUDES = libhttp/hashmap.h \
52 libhttp/httpconnection.h \
57 libhttp_la_SOURCES = libhttp/hashmap.c \
59 libhttp/httpconnection.c \
65 libhttp_la_LDFLAGS = -export-symbols $(top_srcdir)/libhttp/libhttp.sym \
68 shellinaboxd_SOURCES = shellinabox/shellinaboxd.c \
69 shellinabox/externalfile.c \
70 shellinabox/externalfile.h \
71 shellinabox/launcher.c \
72 shellinabox/launcher.h \
73 shellinabox/privileges.c \
74 shellinabox/privileges.h \
75 shellinabox/service.c \
76 shellinabox/service.h \
77 shellinabox/session.c \
78 shellinabox/session.h \
79 shellinabox/cgi_root.html \
80 shellinabox/root_page.html \
81 shellinabox/vt100.jspp \
82 shellinabox/shell_in_a_box.jspp \
83 shellinabox/styles.css \
84 shellinabox/favicon.ico \
85 shellinabox/beep.wav \
87 shellinaboxd_LDADD = liblogging.la \
89 shellinaboxd_LDFLAGS = -static
91 objcopyflags = case "$(host_cpu)" in \
92 i[0-9]86) echo '-O elf32-i386 -B i386';; \
93 x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
94 arm*) echo '-O elf32-littlearm -B arm';; \
98 sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
100 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
104 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
106 -e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
110 -e 's/^/--redefine-sym _binary_/' \
111 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
112 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
113 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
115 libtool: $(LIBTOOL_DEPS)
116 $(SHELL) ./config.status --recheck
119 ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \
120 ${top_srcdir}/demo/demo.jspp \
121 ${top_srcdir}/demo/favicon.ico \
122 ${top_srcdir}/demo/styles.css \
123 ${top_srcdir}/demo/vt100.js
125 ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
129 ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
133 ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
137 ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
141 shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
142 @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
143 echo preprocess "$$src" '>'"$@"; \
144 if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
145 egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
146 wc -l` -eq 3 ]; then \
147 sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#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 '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \
155 sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \
157 if [ -n "${DPKGBUILD}" ]; then \
158 sed -e '/^#ifndef *DPKGBUILD$$/,/^#endif$$/d'; \
160 sed -e '/^#ifdef *DPKGBUILD$$/,/^#endif$$/d'; \
163 @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
164 man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
167 -rm -rf shellinaboxd.1 \
169 -rm -rf debian/shellinabox \
170 debian/shellinabox*.debhelper* \
171 debian/shellinabox.substvars \
175 @echo objcopy "$<" "$@"
176 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
180 @echo objcopy "$<" "$@"
181 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
185 @echo objcopy "$<" "$@"
186 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
189 shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
192 @echo preprocess "$<" "$@"
193 @sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
197 -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
201 @echo objcopy "$<" "$@"
202 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
206 @echo objcopy "$<" "$@"
207 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \