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/usercss.c \
80 shellinabox/usercss.h \
81 shellinabox/cgi_root.html \
82 shellinabox/root_page.html \
83 shellinabox/vt100.jspp \
84 shellinabox/shell_in_a_box.jspp \
85 shellinabox/styles.css \
86 shellinabox/favicon.ico \
87 shellinabox/beep.wav \
89 shellinaboxd_LDADD = liblogging.la \
91 shellinaboxd_LDFLAGS = -static
93 objcopyflags = case "$(host_cpu)" in \
94 i[0-9]86) echo '-O elf32-i386 -B i386';; \
95 x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
96 arm*) echo '-O elf32-littlearm -B arm';; \
100 sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
102 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
106 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
108 -e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
112 -e 's/^/--redefine-sym _binary_/' \
113 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
114 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
115 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
117 libtool: $(LIBTOOL_DEPS)
118 $(SHELL) ./config.status --recheck
121 ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \
122 ${top_srcdir}/demo/demo.jspp \
123 ${top_srcdir}/demo/favicon.ico \
124 ${top_srcdir}/demo/styles.css \
125 ${top_srcdir}/demo/vt100.js
127 ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
131 ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
135 ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
139 ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
143 shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
144 @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
145 echo preprocess "$$src" '>'"$@"; \
146 if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
147 egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
148 wc -l` -eq 3 ]; then \
149 sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \
151 sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \
153 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
154 grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \
155 sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \
157 sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \
159 if [ -n "${DPKGBUILD}" ]; then \
160 sed -e '/^#ifndef *DPKGBUILD$$/,/^#endif$$/d'; \
162 sed -e '/^#ifdef *DPKGBUILD$$/,/^#endif$$/d'; \
165 @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
166 man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
169 -rm -rf shellinaboxd.1 \
171 -rm -rf debian/shellinabox \
172 debian/shellinabox*.debhelper* \
173 debian/shellinabox.substvars \
177 @echo objcopy "$<" "$@"
178 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
182 @echo objcopy "$<" "$@"
183 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
187 @echo objcopy "$<" "$@"
188 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
191 shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
194 @echo preprocess "$<" "$@"
195 @sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
199 -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
203 @echo objcopy "$<" "$@"
204 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
208 @echo objcopy "$<" "$@"
209 @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \