2008-12-30 00:57:07 +01:00
|
|
|
AM_CPPFLAGS =
|
2009-03-30 10:41:48 +02:00
|
|
|
AM_CFLAGS = -g -std=gnu99 -Wall
|
2008-12-30 00:57:07 +01:00
|
|
|
AM_LDFLAGS = -g
|
|
|
|
|
|
|
|
noinst_LTLIBRARIES = libhttp.la \
|
|
|
|
liblogging.la
|
2009-03-30 10:41:48 +02:00
|
|
|
noinst_DATA = $(top_srcdir)/demo/demo.js
|
2008-12-30 00:57:07 +01:00
|
|
|
bin_PROGRAMS = shellinaboxd
|
|
|
|
man_MANS = shellinaboxd.1
|
|
|
|
noinst_HEADERS = libhttp/http.h
|
|
|
|
dist_doc_DATA = AUTHORS \
|
|
|
|
COPYING \
|
|
|
|
GPL-2 \
|
|
|
|
ChangeLog \
|
|
|
|
INSTALL \
|
|
|
|
NEWS \
|
|
|
|
README \
|
2009-07-30 19:40:54 +02:00
|
|
|
TODO \
|
2009-08-12 04:32:26 +02:00
|
|
|
shellinabox/white-on-black.css \
|
|
|
|
shellinabox/black-on-white.css \
|
|
|
|
shellinabox/monochrome.css \
|
|
|
|
shellinabox/color.css
|
2009-03-30 10:41:48 +02:00
|
|
|
EXTRA_DIST = demo/beep.wav \
|
|
|
|
demo/favicon.ico \
|
|
|
|
demo/demo.html \
|
|
|
|
demo/demo.js \
|
|
|
|
demo/demo.jspp \
|
2009-03-30 11:25:42 +02:00
|
|
|
demo/demo.xml \
|
2009-08-12 04:32:26 +02:00
|
|
|
demo/enabled.gif \
|
2009-03-30 10:41:48 +02:00
|
|
|
demo/styles.css \
|
2009-08-20 10:16:28 +02:00
|
|
|
demo/print-styles.css \
|
2009-03-30 10:41:48 +02:00
|
|
|
demo/vt100.js \
|
2009-08-12 04:32:26 +02:00
|
|
|
demo/usercss-0.css \
|
|
|
|
demo/usercss-1.css \
|
|
|
|
demo/usercss-2.css \
|
|
|
|
demo/usercss-3.css \
|
2009-03-30 10:41:48 +02:00
|
|
|
shellinabox/shellinaboxd.man.in \
|
2009-03-24 00:12:17 +01:00
|
|
|
shellinabox/shell_in_a_box.js \
|
|
|
|
shellinabox/vt100.js \
|
2009-08-17 19:14:32 +02:00
|
|
|
shellinabox/cgi-mode-example.sh \
|
2008-12-30 00:57:07 +01:00
|
|
|
debian/README \
|
2009-08-15 07:24:31 +02:00
|
|
|
debian/README.available \
|
|
|
|
debian/README.enabled \
|
2008-12-30 00:57:07 +01:00
|
|
|
debian/changelog \
|
|
|
|
debian/compat \
|
|
|
|
debian/control \
|
|
|
|
debian/copyright \
|
|
|
|
debian/docs \
|
|
|
|
debian/rules \
|
|
|
|
debian/shellinabox.default \
|
|
|
|
debian/shellinabox.dirs \
|
|
|
|
debian/shellinabox.init \
|
|
|
|
debian/shellinabox.install \
|
|
|
|
debian/shellinabox.postinst \
|
|
|
|
debian/shellinabox.postrm
|
2009-02-12 00:25:15 +01:00
|
|
|
LIBLOGGING_INCLUDES = logging/logging.h \
|
|
|
|
config.h
|
2008-12-30 00:57:07 +01:00
|
|
|
liblogging_la_SOURCES= logging/logging.c \
|
|
|
|
$(LIBLOGGING_INCLUDES)
|
|
|
|
liblogging_la_LDFLAGS= -version 1:0:0
|
|
|
|
|
|
|
|
LIBHTTP_INCLUDES = libhttp/hashmap.h \
|
|
|
|
libhttp/trie.h \
|
|
|
|
libhttp/httpconnection.h \
|
|
|
|
libhttp/server.h \
|
|
|
|
libhttp/ssl.h \
|
2009-02-12 00:25:15 +01:00
|
|
|
libhttp/url.h \
|
|
|
|
config.h
|
2008-12-30 00:57:07 +01:00
|
|
|
libhttp_la_SOURCES = libhttp/hashmap.c \
|
|
|
|
libhttp/trie.c \
|
|
|
|
libhttp/httpconnection.c \
|
|
|
|
libhttp/server.c \
|
|
|
|
libhttp/ssl.c \
|
|
|
|
libhttp/url.c \
|
|
|
|
$(LIBHTTP_INCLUDES) \
|
|
|
|
libhttp/libhttp.sym
|
|
|
|
libhttp_la_LDFLAGS = -export-symbols $(top_srcdir)/libhttp/libhttp.sym \
|
2009-02-02 22:42:33 +01:00
|
|
|
-version 1:0:0
|
2008-12-30 00:57:07 +01:00
|
|
|
|
|
|
|
shellinaboxd_SOURCES = shellinabox/shellinaboxd.c \
|
|
|
|
shellinabox/externalfile.c \
|
|
|
|
shellinabox/externalfile.h \
|
|
|
|
shellinabox/launcher.c \
|
|
|
|
shellinabox/launcher.h \
|
|
|
|
shellinabox/privileges.c \
|
|
|
|
shellinabox/privileges.h \
|
|
|
|
shellinabox/service.c \
|
|
|
|
shellinabox/service.h \
|
|
|
|
shellinabox/session.c \
|
|
|
|
shellinabox/session.h \
|
2009-08-11 09:21:51 +02:00
|
|
|
shellinabox/usercss.c \
|
|
|
|
shellinabox/usercss.h \
|
2009-01-01 06:53:04 +01:00
|
|
|
shellinabox/cgi_root.html \
|
2008-12-30 00:57:07 +01:00
|
|
|
shellinabox/root_page.html \
|
2009-03-24 00:12:17 +01:00
|
|
|
shellinabox/vt100.jspp \
|
|
|
|
shellinabox/shell_in_a_box.jspp \
|
2008-12-30 00:57:07 +01:00
|
|
|
shellinabox/styles.css \
|
2009-08-20 10:16:28 +02:00
|
|
|
shellinabox/print-styles.css \
|
2009-08-12 04:32:26 +02:00
|
|
|
shellinabox/enabled.gif \
|
2008-12-30 00:57:07 +01:00
|
|
|
shellinabox/favicon.ico \
|
2009-02-12 00:25:15 +01:00
|
|
|
shellinabox/beep.wav \
|
|
|
|
config.h
|
2008-12-30 00:57:07 +01:00
|
|
|
shellinaboxd_LDADD = liblogging.la \
|
|
|
|
libhttp.la
|
2009-02-02 22:42:33 +01:00
|
|
|
shellinaboxd_LDFLAGS = -static
|
2008-12-30 00:57:07 +01:00
|
|
|
|
2009-06-21 21:41:32 +02:00
|
|
|
objcopyflags = case "$(host_cpu)" in \
|
|
|
|
i[0-9]86) echo '-O elf32-i386 -B i386';; \
|
|
|
|
x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
|
|
|
|
arm*) echo '-O elf32-littlearm -B arm';; \
|
|
|
|
esac
|
|
|
|
|
|
|
|
renamesymbols = \
|
|
|
|
sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
|
|
|
|
-e 't0' \
|
|
|
|
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
|
|
|
|
-e 't0' \
|
|
|
|
-e 's/.*/&=& /' \
|
|
|
|
-e ':0' \
|
|
|
|
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
|
|
|
|
-e ':1' \
|
2009-08-20 10:16:28 +02:00
|
|
|
-e 's/\(=[^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
|
2009-06-21 21:41:32 +02:00
|
|
|
-e 't1' \
|
|
|
|
-e 's/.\{53\}$$//' \
|
2009-08-20 10:16:28 +02:00
|
|
|
-e 's/[-/.]/_/g' \
|
2009-06-21 21:41:32 +02:00
|
|
|
-e 's/^/--redefine-sym _binary_/' \
|
|
|
|
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
|
|
|
|
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
|
|
|
|
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
|
|
|
|
|
2008-12-30 00:57:07 +01:00
|
|
|
libtool: $(LIBTOOL_DEPS)
|
|
|
|
$(SHELL) ./config.status --recheck
|
|
|
|
|
2009-03-30 11:00:41 +02:00
|
|
|
|
|
|
|
${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \
|
|
|
|
${top_srcdir}/demo/demo.jspp \
|
|
|
|
${top_srcdir}/demo/favicon.ico \
|
|
|
|
${top_srcdir}/demo/styles.css \
|
2009-08-20 10:16:28 +02:00
|
|
|
${top_srcdir}/demo/print-styles.css \
|
2009-08-12 04:32:26 +02:00
|
|
|
${top_srcdir}/demo/vt100.js \
|
|
|
|
${top_srcdir}/demo/usercss-0.css \
|
|
|
|
${top_srcdir}/demo/usercss-1.css \
|
|
|
|
${top_srcdir}/demo/usercss-2.css \
|
|
|
|
${top_srcdir}/demo/usercss-3.css
|
2009-03-30 11:00:41 +02:00
|
|
|
|
|
|
|
${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
|
|
|
|
@rm -f "$@"
|
|
|
|
ln "$<" "$@"
|
|
|
|
|
2009-08-12 04:32:26 +02:00
|
|
|
${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif
|
|
|
|
@rm -f "$@"
|
|
|
|
ln "$<" "$@"
|
|
|
|
|
2009-03-30 11:00:41 +02:00
|
|
|
${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
|
|
|
|
@rm -f "$@"
|
|
|
|
ln "$<" "$@"
|
|
|
|
|
|
|
|
${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
|
|
|
|
@rm -f "$@"
|
2009-08-16 07:20:09 +02:00
|
|
|
sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$<" >"$@"
|
2009-03-30 11:00:41 +02:00
|
|
|
|
2009-08-20 10:16:28 +02:00
|
|
|
${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css
|
|
|
|
@rm -f "$@"
|
|
|
|
ln "$<" "$@"
|
|
|
|
|
2009-08-12 04:32:26 +02:00
|
|
|
${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css
|
|
|
|
@rm -f "$@"
|
|
|
|
ln "$<" "$@"
|
|
|
|
|
|
|
|
${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css
|
|
|
|
@rm -f "$@"
|
|
|
|
ln "$<" "$@"
|
|
|
|
|
|
|
|
${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css
|
|
|
|
@rm -f "$@"
|
|
|
|
ln "$<" "$@"
|
|
|
|
|
|
|
|
${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css
|
|
|
|
@rm -f "$@"
|
|
|
|
ln "$<" "$@"
|
|
|
|
|
2009-03-30 11:00:41 +02:00
|
|
|
${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
|
|
|
|
@rm -f "$@"
|
|
|
|
ln "$<" "$@"
|
|
|
|
|
2009-03-24 00:12:17 +01:00
|
|
|
shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
|
2009-02-02 22:42:33 +01:00
|
|
|
@src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
|
|
|
|
echo preprocess "$$src" '>'"$@"; \
|
2009-03-24 00:12:17 +01:00
|
|
|
if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
|
2009-02-17 05:13:47 +01:00
|
|
|
egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
|
|
|
|
wc -l` -eq 3 ]; then \
|
2009-07-29 23:08:06 +02:00
|
|
|
sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \
|
2009-02-02 22:42:33 +01:00
|
|
|
else \
|
2009-07-29 23:08:06 +02:00
|
|
|
sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \
|
|
|
|
fi | \
|
2009-03-24 00:12:17 +01:00
|
|
|
if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
|
2009-02-17 05:13:47 +01:00
|
|
|
grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \
|
2009-07-29 23:08:06 +02:00
|
|
|
sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \
|
2009-02-17 05:13:47 +01:00
|
|
|
else \
|
2009-07-29 23:08:06 +02:00
|
|
|
sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \
|
|
|
|
fi | \
|
2009-07-30 19:40:54 +02:00
|
|
|
if [ -n "${DPKGBUILD}" ]; then \
|
|
|
|
sed -e '/^#ifndef *DPKGBUILD$$/,/^#endif$$/d'; \
|
|
|
|
else \
|
|
|
|
sed -e '/^#ifdef *DPKGBUILD$$/,/^#endif$$/d'; \
|
|
|
|
fi | \
|
2009-07-29 23:08:06 +02:00
|
|
|
sed -e '/^#/d' >"$@"
|
2009-02-17 05:13:47 +01:00
|
|
|
@out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
|
|
|
|
man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
|
2008-12-30 00:57:07 +01:00
|
|
|
|
|
|
|
clean-local:
|
|
|
|
-rm -rf shellinaboxd.1 \
|
|
|
|
shellinaboxd.ps
|
|
|
|
-rm -rf debian/shellinabox \
|
|
|
|
debian/shellinabox*.debhelper* \
|
|
|
|
debian/shellinabox.substvars \
|
|
|
|
debian/tmp
|
|
|
|
|
|
|
|
.css.o:
|
2009-05-21 09:50:22 +02:00
|
|
|
@echo objcopy "$<" "$@"
|
2009-06-21 21:41:32 +02:00
|
|
|
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
|
2009-08-12 04:32:26 +02:00
|
|
|
"$<" "$@"
|
|
|
|
|
|
|
|
.gif.o:
|
|
|
|
@echo objcopy "$<" "$@"
|
|
|
|
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
|
2008-12-30 00:57:07 +01:00
|
|
|
"$<" "$@"
|
|
|
|
|
|
|
|
.html.o:
|
2009-05-21 09:50:22 +02:00
|
|
|
@echo objcopy "$<" "$@"
|
2009-06-21 21:41:32 +02:00
|
|
|
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
|
2008-12-30 00:57:07 +01:00
|
|
|
"$<" "$@"
|
|
|
|
|
|
|
|
.ico.o:
|
2009-05-21 09:50:22 +02:00
|
|
|
@echo objcopy "$<" "$@"
|
2009-06-21 21:41:32 +02:00
|
|
|
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
|
2008-12-30 00:57:07 +01:00
|
|
|
"$<" "$@"
|
|
|
|
|
2009-02-17 06:43:34 +01:00
|
|
|
shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
|
|
|
|
|
2009-03-24 00:12:17 +01:00
|
|
|
.jspp.js:
|
2009-05-21 09:50:22 +02:00
|
|
|
@echo preprocess "$<" "$@"
|
2009-03-24 00:12:17 +01:00
|
|
|
@sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
|
2009-02-02 22:42:33 +01:00
|
|
|
-e t \
|
|
|
|
-e d "$<"`" \
|
|
|
|
-e "s/^#/\/\/ #/" \
|
2009-02-17 06:26:58 +01:00
|
|
|
-e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
|
2009-06-21 21:41:32 +02:00
|
|
|
"$<" >"$@"
|
2009-03-24 00:12:17 +01:00
|
|
|
|
|
|
|
.js.o:
|
2009-05-21 09:50:22 +02:00
|
|
|
@echo objcopy "$<" "$@"
|
2009-06-21 21:41:32 +02:00
|
|
|
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
|
2009-03-24 00:12:17 +01:00
|
|
|
"$<" "$@"
|
2008-12-30 00:57:07 +01:00
|
|
|
|
|
|
|
.wav.o:
|
2009-05-21 09:50:22 +02:00
|
|
|
@echo objcopy "$<" "$@"
|
2009-06-21 21:41:32 +02:00
|
|
|
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
|
2008-12-30 00:57:07 +01:00
|
|
|
"$<" "$@"
|
|
|
|
|