]> andersk Git - test.git/blob - Makefile.am
93ab34f78851a3615343c6f8f4c92bcfe98345ac
[test.git] / Makefile.am
1 AM_CPPFLAGS          =
2 AM_CFLAGS            = -g -std=gnu99 -Wall
3 AM_LDFLAGS           = -g
4
5 noinst_LTLIBRARIES   = libhttp.la                                             \
6                        liblogging.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                                                \
12                        COPYING                                                \
13                        GPL-2                                                  \
14                        ChangeLog                                              \
15                        INSTALL                                                \
16                        NEWS                                                   \
17                        README                                                 \
18                        TODO                                                   \
19                        shellinabox/white-on-black.css                         \
20                        shellinabox/black-on-white.css                         \
21                        shellinabox/monochrome.css                             \
22                        shellinabox/color.css
23 EXTRA_DIST           = INSTALL.Debian                                         \
24                        README.Fedora                                          \
25                        demo/beep.wav                                          \
26                        demo/favicon.ico                                       \
27                        demo/demo.html                                         \
28                        demo/demo.js                                           \
29                        demo/demo.jspp                                         \
30                        demo/demo.xml                                          \
31                        demo/enabled.gif                                       \
32                        demo/styles.css                                        \
33                        demo/print-styles.css                                  \
34                        demo/vt100.js                                          \
35                        demo/usercss-0.css                                     \
36                        demo/usercss-1.css                                     \
37                        demo/usercss-2.css                                     \
38                        demo/usercss-3.css                                     \
39                        etc-pam.d-shellinabox-example                          \
40                        shellinabox/shellinaboxd.man.in                        \
41                        shellinabox/shell_in_a_box.js                          \
42                        shellinabox/vt100.js                                   \
43                        shellinabox/cgi-mode-example.sh                        \
44                        debian/README                                          \
45                        debian/README.available                                \
46                        debian/README.enabled                                  \
47                        debian/changelog                                       \
48                        debian/compat                                          \
49                        debian/control                                         \
50                        debian/copyright                                       \
51                        debian/docs                                            \
52                        debian/rules                                           \
53                        debian/shellinabox.default                             \
54                        debian/shellinabox.dirs                                \
55                        debian/shellinabox.init                                \
56                        debian/shellinabox.install                             \
57                        debian/shellinabox.postinst                            \
58                        debian/shellinabox.postrm                              \
59                        debian/watch
60 LIBLOGGING_INCLUDES  = logging/logging.h                                      \
61                        config.h
62 liblogging_la_SOURCES= logging/logging.c                                      \
63                        $(LIBLOGGING_INCLUDES)
64 liblogging_la_LDFLAGS= -version 1:0:0
65
66 LIBHTTP_INCLUDES     = libhttp/hashmap.h                                      \
67                        libhttp/trie.h                                         \
68                        libhttp/httpconnection.h                               \
69                        libhttp/server.h                                       \
70                        libhttp/ssl.h                                          \
71                        libhttp/url.h                                          \
72                        config.h
73 libhttp_la_SOURCES   = libhttp/hashmap.c                                      \
74                        libhttp/trie.c                                         \
75                        libhttp/httpconnection.c                               \
76                        libhttp/server.c                                       \
77                        libhttp/ssl.c                                          \
78                        libhttp/url.c                                          \
79                        $(LIBHTTP_INCLUDES)                                    \
80                        libhttp/libhttp.sym
81 libhttp_la_LDFLAGS   = -export-symbols  $(top_srcdir)/libhttp/libhttp.sym     \
82                        -version 1:0:0
83
84 shellinaboxd_SOURCES = shellinabox/shellinaboxd.c                             \
85                        shellinabox/externalfile.c                             \
86                        shellinabox/externalfile.h                             \
87                        shellinabox/launcher.c                                 \
88                        shellinabox/launcher.h                                 \
89                        shellinabox/privileges.c                               \
90                        shellinabox/privileges.h                               \
91                        shellinabox/service.c                                  \
92                        shellinabox/service.h                                  \
93                        shellinabox/session.c                                  \
94                        shellinabox/session.h                                  \
95                        shellinabox/usercss.c                                  \
96                        shellinabox/usercss.h                                  \
97                        shellinabox/cgi_root.html                              \
98                        shellinabox/root_page.html                             \
99                        shellinabox/vt100.jspp                                 \
100                        shellinabox/shell_in_a_box.jspp                        \
101                        shellinabox/styles.css                                 \
102                        shellinabox/print-styles.css                           \
103                        shellinabox/enabled.gif                                \
104                        shellinabox/favicon.ico                                \
105                        shellinabox/beep.wav                                   \
106                        config.h
107 shellinaboxd_LDADD   = liblogging.la                                          \
108                        libhttp.la
109 shellinaboxd_LDFLAGS = -static
110
111 objcopyflags         = case "$(host_cpu)" in                                  \
112                          i[0-9]86) echo '-O elf32-i386 -B i386';;             \
113                          x86_64)   echo '-O elf64-x86-64 -B i386:x86-64';;    \
114                          *)        trap 'rm -f /tmp/probe$$$$.o' EXIT;        \
115                                    $(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc        \
116                                          -o /tmp/probe$$$$.o /dev/null &&     \
117                                    objdump -f /tmp/probe$$$$.o |              \
118                                    sed -e 's/.*file format */-O /;t;          \
119                                         s/architecture: *\([^,]*\).*/-B \1/;t;\
120                                         d';;                                  \
121                        esac
122
123 renamesymbols        =                                                        \
124   sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /'                           \
125       -e 't0'                                                                 \
126       -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /'                                     \
127       -e 't0'                                                                 \
128       -e 's/.*/&=& /'                                                         \
129       -e ':0'                                                                 \
130       -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/'         \
131       -e ':1'                                                                 \
132       -e 's/\(=[^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/'            \
133       -e 't1'                                                                 \
134       -e 's/.\{53\}$$//'                                                      \
135       -e 's/[-/.]/_/g'                                                        \
136       -e 's/^/--redefine-sym _binary_/'                                       \
137       -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/'                               \
138       -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/'                           \
139       -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
140
141 libtool: $(LIBTOOL_DEPS)
142         $(SHELL) ./config.status --recheck
143
144
145 ${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav                       \
146                             ${top_srcdir}/demo/demo.jspp                      \
147                             ${top_srcdir}/demo/favicon.ico                    \
148                             ${top_srcdir}/demo/styles.css                     \
149                             ${top_srcdir}/demo/print-styles.css               \
150                             ${top_srcdir}/demo/vt100.js                       \
151                             ${top_srcdir}/demo/usercss-0.css                  \
152                             ${top_srcdir}/demo/usercss-1.css                  \
153                             ${top_srcdir}/demo/usercss-2.css                  \
154                             ${top_srcdir}/demo/usercss-3.css
155
156 ${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
157         @rm -f "$@"
158         ln "$<" "$@"
159
160 ${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif
161         @rm -f "$@"
162         ln "$<" "$@"
163
164 ${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
165         @rm -f "$@"
166         ln "$<" "$@"
167
168 ${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
169         @rm -f "$@"
170         sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$<" >"$@"
171
172 ${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css
173         @rm -f "$@"
174         ln "$<" "$@"
175
176 ${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css
177         @rm -f "$@"
178         ln "$<" "$@"
179
180 ${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css
181         @rm -f "$@"
182         ln "$<" "$@"
183
184 ${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css
185         @rm -f "$@"
186         ln "$<" "$@"
187
188 ${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css
189         @rm -f "$@"
190         ln "$<" "$@"
191
192 ${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
193         @rm -f "$@"
194         ln "$<" "$@"
195
196 shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h
197         @src="${top_srcdir}/shellinabox/shellinaboxd.man.in";                 \
198         echo preprocess  "$$src" '>'"$@";                                     \
199         if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h |        \
200              egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
201              wc -l` -eq 3 ]; then                                             \
202           sed -e '/^#ifndef  *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src";          \
203         else                                                                  \
204           sed -e '/^#ifdef  *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src";           \
205         fi |                                                                  \
206         if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h |           \
207              grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then            \
208           sed -e '/^#ifndef  *HAVE_PAM$$/,/^#endif$$/d';                      \
209         else                                                                  \
210           sed -e '/^#ifdef  *HAVE_PAM$$/,/^#endif$$/d';                       \
211         fi |                                                                  \
212         if [ -n "${DPKGBUILD}" ]; then                                        \
213           sed -e '/^#ifndef  *DPKGBUILD$$/,/^#endif$$/d';                     \
214         else                                                                  \
215           sed -e '/^#ifdef  *DPKGBUILD$$/,/^#endif$$/d';                      \
216         fi |                                                                  \
217         sed -e '/^#/d' >"$@"
218         @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`;               \
219         man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
220
221 clean-local:
222         -rm -rf shellinaboxd.1                                                \
223                 shellinaboxd.ps
224         -rm -rf debian/shellinabox                                            \
225                 debian/shellinabox*.debhelper*                                \
226                 debian/shellinabox.substvars                                  \
227                 debian/tmp
228
229 .css.o:
230         @echo objcopy "$<" "$@"
231         @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`   \
232           "$<" "$@"
233
234 .gif.o:
235         @echo objcopy "$<" "$@"
236         @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`   \
237           "$<" "$@"
238
239 .html.o:
240         @echo objcopy "$<" "$@"
241         @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`   \
242           "$<" "$@"
243
244 .ico.o:
245         @echo objcopy "$<" "$@"
246         @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`   \
247           "$<" "$@"
248
249 shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
250
251 .jspp.js:
252         @echo preprocess "$<" "$@"
253         @sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
254                      -e t                                                     \
255                      -e d "$<"`"                                              \
256              -e "s/^#/\/\/ #/"                                                \
257              -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g"         \
258              "$<" >"$@"
259
260 .js.o:
261         @echo objcopy "$<" "$@"
262         @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`   \
263           "$<" "$@"
264
265 .wav.o:
266         @echo objcopy "$<" "$@"
267         @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`   \
268           "$<" "$@"
269
This page took 0.047307 seconds and 3 git commands to generate.