]> andersk Git - test.git/blobdiff - Makefile.am
Use 2048-bit RSA keys for auto-generated certificates.
[test.git] / Makefile.am
index 37592029c113b34df5384830cf871cb267d0f4e6..4982861a94fc920a79c88de28f796dcd67ead986 100644 (file)
@@ -1,6 +1,6 @@
 AM_CPPFLAGS          =
 AM_CFLAGS            = -g -std=gnu99 -Wall
-AM_LDFLAGS           = -g
+AM_LDFLAGS           = -g -lm
 
 noinst_LTLIBRARIES   = libhttp.la                                             \
                        liblogging.la
@@ -29,6 +29,8 @@ EXTRA_DIST           = INSTALL.Debian                                         \
                        demo/demo.jspp                                         \
                        demo/demo.xml                                          \
                        demo/enabled.gif                                       \
+                       demo/keyboard.html                                     \
+                       demo/keyboard.png                                      \
                        demo/styles.css                                        \
                        demo/print-styles.css                                  \
                        demo/vt100.js                                          \
@@ -56,6 +58,7 @@ EXTRA_DIST           = INSTALL.Debian                                         \
                        debian/shellinabox.install                             \
                        debian/shellinabox.postinst                            \
                        debian/shellinabox.postrm                              \
+                       debian/source/format                                   \
                        debian/watch
 LIBLOGGING_INCLUDES  = logging/logging.h                                      \
                        config.h
@@ -102,41 +105,40 @@ shellinaboxd_SOURCES = shellinabox/shellinaboxd.c                             \
                        shellinabox/print-styles.css                           \
                        shellinabox/enabled.gif                                \
                        shellinabox/favicon.ico                                \
+                       shellinabox/keyboard.png                               \
+                       shellinabox/keyboard-layout.html                       \
                        shellinabox/beep.wav                                   \
                        config.h
+BUILT_SOURCES        = shellinabox/beep.h                                     \
+                       shellinabox/cgi_root.h                                 \
+                       shellinabox/enabled.h                                  \
+                       shellinabox/favicon.h                                  \
+                       shellinabox/keyboard.h                                 \
+                       shellinabox/keyboard-layout.h                          \
+                       shellinabox/print-styles.h                             \
+                       shellinabox/root_page.h                                \
+                       shellinabox/shell_in_a_box.h                           \
+                       shellinabox/shell_in_a_box.js                          \
+                       shellinabox/styles.h                                   \
+                       shellinabox/vt100.h                                    \
+                       shellinabox/vt100.js
+
+
 shellinaboxd_LDADD   = liblogging.la                                          \
                        libhttp.la
 shellinaboxd_LDFLAGS = -static
 
-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';;    \
-                         *)        trap 'rm -f /tmp/probe$$$$.o' EXIT;        \
-                                   $(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc        \
-                                         -o /tmp/probe$$$$.o /dev/null &&     \
-                                   objdump -f /tmp/probe$$$$.o |              \
-                                   sed -e 's/.*file format */-O /;t;          \
-                                        s/architecture: *\([^,]*\).*/-B \1/;t;\
-                                        d';;                                  \
-                       esac
-
-renamesymbols        =                                                        \
-  sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /'                           \
+symbolname           =                                                        \
+  sed -e 's/.*\/\([^.]*\)[.].*/\1/'                                           \
       -e 't0'                                                                 \
-      -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /'                                     \
-      -e 't0'                                                                 \
-      -e 's/.*/&=& /'                                                         \
+      -e 's/\([^.]*\)[.].*/\1/'                                               \
       -e ':0'                                                                 \
-      -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/'         \
+      -e 's/$$/ aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/'        \
       -e ':1'                                                                 \
-      -e 's/\(=[^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/'            \
+      -e 's/\([^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/'             \
       -e 't1'                                                                 \
       -e 's/.\{53\}$$//'                                                      \
-      -e 's/[-/.]/_/g'                                                        \
-      -e 's/^/--redefine-sym _binary_/'                                       \
-      -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/'                               \
-      -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/'                           \
-      -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
+      -e 's/[-/.]/_/g'
 
 libtool: $(LIBTOOL_DEPS)
        $(SHELL) ./config.status --recheck
@@ -144,7 +146,10 @@ libtool: $(LIBTOOL_DEPS)
 
 ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav                       \
                             ${top_srcdir}/demo/demo.jspp                      \
+                            ${top_srcdir}/demo/enabled.gif                    \
                             ${top_srcdir}/demo/favicon.ico                    \
+                            ${top_srcdir}/demo/keyboard.html                  \
+                            ${top_srcdir}/demo/keyboard.png                   \
                             ${top_srcdir}/demo/styles.css                     \
                             ${top_srcdir}/demo/print-styles.css               \
                             ${top_srcdir}/demo/vt100.js                       \
@@ -155,45 +160,54 @@ ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav                       \
 
 ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
        @rm -f "$@"
-       ln "$<" "$@"
+       ln "$?" "$@"
 
 ${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif
        @rm -f "$@"
-       ln "$<" "$@"
+       ln "$?" "$@"
 
 ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
        @rm -f "$@"
-       ln "$<" "$@"
+       ln "$?" "$@"
+
+${top_srcdir}/demo/keyboard.html: ${top_srcdir}/shellinabox/keyboard-layout.html
+       @rm -f "$@"
+       ln "$?" "$@"
+
+${top_srcdir}/demo/keyboard.png: ${top_srcdir}/shellinabox/keyboard.png
+       @rm -f "$@"
+       ln "$?" "$@"
 
 ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
        @rm -f "$@"
-       sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$<" >"$@"
+       sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$?" >"$@"
 
 ${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css
        @rm -f "$@"
-       ln "$<" "$@"
+       ln "$?" "$@"
 
 ${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css
        @rm -f "$@"
-       ln "$<" "$@"
+       ln "$?" "$@"
 
 ${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css
        @rm -f "$@"
-       ln "$<" "$@"
+       ln "$?" "$@"
 
 ${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css
        @rm -f "$@"
-       ln "$<" "$@"
+       ln "$?" "$@"
 
 ${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css
        @rm -f "$@"
-       ln "$<" "$@"
+       ln "$?" "$@"
 
 ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
        @rm -f "$@"
-       ln "$<" "$@"
+       ln "$?" "$@"
 
-shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
+shellinaboxd.1: ${top_srcdir}/shellinabox/shellinaboxd.man.in                 \
+               ${top_srcdir}/config.h
        @src="${top_srcdir}/shellinabox/shellinaboxd.man.in";                 \
        echo preprocess  "$$src" '>'"$@";                                     \
        if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h |           \
@@ -226,50 +240,109 @@ shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
 
 clean-local:
        -rm -rf shellinaboxd.1                                                \
-                shellinaboxd.ps
+               shellinaboxd.ps
        -rm -rf debian/shellinabox                                            \
-                debian/shellinabox*.debhelper*                                \
+               debian/shellinabox*.debhelper*                                \
                debian/shellinabox.substvars                                  \
-                debian/tmp
+               debian/tmp
+       -rm -rf shellinabox/beep.h                                            \
+               shellinabox/cgi_root.h                                        \
+               shellinabox/enabled.h                                         \
+               shellinabox/favicon.h                                         \
+               shellinabox/keyboard.h                                        \
+               shellinabox/keyboard-layout.h                                 \
+               shellinabox/print-styles.h                                    \
+               shellinabox/root_page.h                                       \
+               shellinabox/shell_in_a_box.h                                  \
+               shellinabox/styles.h                                          \
+               shellinabox/vt100.h
 
-.css.o:
-       @echo objcopy "$<" "$@"
-       @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`   \
-         "$<" "$@"
+.css.h:
+       @echo od "$<" '>'"$@"
+       @mkdir -p "`dirname "$@"`"
+       @{ sym="`echo "$<" | $(symbolname)`";                                 \
+          echo "static const char $${sym}Start[] =";                         \
+          od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
+          echo ';';                                                          \
+          echo "static const int $${sym}Size ATTR_UNUSED ="                  \
+                  "(int)sizeof($${sym}Start);";                              \
+        } >"$@"
 
-.gif.o:
-       @echo objcopy "$<" "$@"
-       @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`   \
-         "$<" "$@"
+.gif.h:
+       @echo od "$<" '>'"$@"
+       @mkdir -p "`dirname "$@"`"
+       @{ sym="`echo "$<" | $(symbolname)`";                                 \
+          echo "static const char $${sym}Start[] =";                         \
+          od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
+          echo ';';                                                          \
+          echo "static const int $${sym}Size ATTR_UNUSED ="                  \
+                  "(int)sizeof($${sym}Start);";                              \
+        } >"$@"
 
-.html.o:
-       @echo objcopy "$<" "$@"
-       @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`   \
-         "$<" "$@"
+.png.h:
+       @echo od "$<" '>'"$@"
+       @mkdir -p "`dirname "$@"`"
+       @{ sym="`echo "$<" | $(symbolname)`";                                 \
+          echo "static const char $${sym}Start[] =";                         \
+          od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
+          echo ';';                                                          \
+          echo "static const int $${sym}Size ATTR_UNUSED ="                  \
+                  "(int)sizeof($${sym}Start);";                              \
+        } >"$@"
 
-.ico.o:
-       @echo objcopy "$<" "$@"
-       @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`   \
-         "$<" "$@"
+.html.h:
+       @echo od "$<" '>'"$@"
+       @mkdir -p "`dirname "$@"`"
+       @{ sym="`echo "$<" | $(symbolname)`";                                 \
+          echo "static const char $${sym}Start[] =";                         \
+          od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
+          echo ';';                                                          \
+          echo "static const int $${sym}Size ATTR_UNUSED ="                  \
+                  "(int)sizeof($${sym}Start);";                              \
+        } >"$@"
 
-shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
+
+.ico.h:
+       @echo od "$<" '>'"$@"
+       @mkdir -p "`dirname "$@"`"
+       @{ sym="`echo "$<" | $(symbolname)`";                                 \
+          echo "static const char $${sym}Start[] =";                         \
+          od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
+          echo ';';                                                          \
+          echo "static const int $${sym}Size ATTR_UNUSED ="                  \
+                  "(int)sizeof($${sym}Start);";                              \
+        } >"$@"
 
 .jspp.js:
        @echo preprocess "$<" "$@"
-       @sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
+       @mkdir -p "`dirname "$@"`"
+       sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
                     -e t                                                     \
                     -e d "$<"`"                                              \
             -e "s/^#/\/\/ #/"                                                \
             -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g"         \
             "$<" >"$@"
 
-.js.o:
-       @echo objcopy "$<" "$@"
-       @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`   \
-         "$<" "$@"
+.js.h:
+       @echo od "$<" '>'"$@"
+       @mkdir -p "`dirname "$@"`"
+       @{ sym="`echo "$<" | $(symbolname)`";                                 \
+          echo "static const char $${sym}Start[] =";                         \
+          od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
+          echo ';';                                                          \
+          echo "static const int $${sym}Size ATTR_UNUSED ="                  \
+                  "(int)sizeof($${sym}Start);";                              \
+        } >"$@"
+
 
-.wav.o:
-       @echo objcopy "$<" "$@"
-       @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`   \
-         "$<" "$@"
+.wav.h:
+       @echo od "$<" '>'"$@"
+       @mkdir -p "`dirname "$@"`"
+       @{ sym="`echo "$<" | $(symbolname)`";                                 \
+          echo "static const char $${sym}Start[] =";                         \
+          od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
+          echo ';';                                                          \
+          echo "static const int $${sym}Size ATTR_UNUSED ="                  \
+                  "(int)sizeof($${sym}Start);";                              \
+        } >"$@"
 
This page took 0.091956 seconds and 4 git commands to generate.