Project

General

Profile

Download (18.9 KB) Statistics
| Branch: | Revision:
1
AM_CPPFLAGS          =
2
AM_CFLAGS            = -g -std=gnu99 -Wall
3
AM_LDFLAGS           = -g -lm
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/keyboard.html                                     \
33
                       demo/keyboard.png                                      \
34
                       demo/styles.css                                        \
35
                       demo/print-styles.css                                  \
36
                       demo/vt100.js                                          \
37
                       demo/usercss-0.css                                     \
38
                       demo/usercss-1.css                                     \
39
                       demo/usercss-2.css                                     \
40
                       demo/usercss-3.css                                     \
41
                       etc-pam.d-shellinabox-example                          \
42
                       shellinabox/shellinaboxd.man.in                        \
43
                       shellinabox/shell_in_a_box.js                          \
44
                       shellinabox/vt100.js                                   \
45
                       shellinabox/cgi-mode-example.sh                        \
46
                       debian/README                                          \
47
                       debian/README.available                                \
48
                       debian/README.enabled                                  \
49
                       debian/changelog                                       \
50
                       debian/compat                                          \
51
                       debian/control                                         \
52
                       debian/copyright                                       \
53
                       debian/docs                                            \
54
                       debian/rules                                           \
55
                       debian/shellinabox.default                             \
56
                       debian/shellinabox.dirs                                \
57
                       debian/shellinabox.init                                \
58
                       debian/shellinabox.install                             \
59
                       debian/shellinabox.postinst                            \
60
                       debian/shellinabox.postrm                              \
61
                       debian/source/format                                   \
62
                       debian/watch
63
LIBLOGGING_INCLUDES  = logging/logging.h                                      \
64
                       config.h
65
liblogging_la_SOURCES= logging/logging.c                                      \
66
                       $(LIBLOGGING_INCLUDES)
67
liblogging_la_LDFLAGS= -version 1:0:0
68

    
69
LIBHTTP_INCLUDES     = libhttp/hashmap.h                                      \
70
                       libhttp/trie.h                                         \
71
                       libhttp/httpconnection.h                               \
72
                       libhttp/server.h                                       \
73
                       libhttp/ssl.h                                          \
74
                       libhttp/url.h                                          \
75
                       config.h
76
libhttp_la_SOURCES   = libhttp/hashmap.c                                      \
77
                       libhttp/trie.c                                         \
78
                       libhttp/httpconnection.c                               \
79
                       libhttp/server.c                                       \
80
                       libhttp/ssl.c                                          \
81
                       libhttp/url.c                                          \
82
                       $(LIBHTTP_INCLUDES)                                    \
83
                       libhttp/libhttp.sym
84
libhttp_la_LDFLAGS   = -export-symbols  $(top_srcdir)/libhttp/libhttp.sym     \
85
                       -version 1:0:0
86

    
87
shellinaboxd_SOURCES = shellinabox/shellinaboxd.c                             \
88
                       shellinabox/externalfile.c                             \
89
                       shellinabox/externalfile.h                             \
90
                       shellinabox/launcher.c                                 \
91
                       shellinabox/launcher.h                                 \
92
                       shellinabox/privileges.c                               \
93
                       shellinabox/privileges.h                               \
94
                       shellinabox/service.c                                  \
95
                       shellinabox/service.h                                  \
96
                       shellinabox/session.c                                  \
97
                       shellinabox/session.h                                  \
98
                       shellinabox/usercss.c                                  \
99
                       shellinabox/usercss.h                                  \
100
                       shellinabox/cgi_root.html                              \
101
                       shellinabox/root_page.html                             \
102
                       shellinabox/vt100.jspp                                 \
103
                       shellinabox/shell_in_a_box.jspp                        \
104
                       shellinabox/styles.css                                 \
105
                       shellinabox/print-styles.css                           \
106
                       shellinabox/enabled.gif                                \
107
                       shellinabox/favicon.ico                                \
108
                       shellinabox/keyboard.png                               \
109
                       shellinabox/keyboard-layout.html                       \
110
                       shellinabox/beep.wav                                   \
111
                       config.h
112
BUILT_SOURCES        = shellinabox/beep.h                                     \
113
                       shellinabox/cgi_root.h                                 \
114
                       shellinabox/enabled.h                                  \
115
                       shellinabox/favicon.h                                  \
116
                       shellinabox/keyboard.h                                 \
117
                       shellinabox/keyboard-layout.h                          \
118
                       shellinabox/print-styles.h                             \
119
                       shellinabox/root_page.h                                \
120
                       shellinabox/shell_in_a_box.h                           \
121
                       shellinabox/shell_in_a_box.js                          \
122
                       shellinabox/styles.h                                   \
123
                       shellinabox/vt100.h                                    \
124
                       shellinabox/vt100.js
125

    
126

    
127
shellinaboxd_LDADD   = liblogging.la                                          \
128
                       libhttp.la
129
shellinaboxd_LDFLAGS = -static
130

    
131
symbolname           =                                                        \
132
  sed -e 's/.*\/\([^.]*\)[.].*/\1/'                                           \
133
      -e 't0'                                                                 \
134
      -e 's/\([^.]*\)[.].*/\1/'                                               \
135
      -e ':0'                                                                 \
136
      -e 's/$$/ aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/'        \
137
      -e ':1'                                                                 \
138
      -e 's/\([^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/'             \
139
      -e 't1'                                                                 \
140
      -e 's/.\{53\}$$//'                                                      \
141
      -e 's/[-/.]/_/g'
142

    
143
libtool: $(LIBTOOL_DEPS)
144
	$(SHELL) ./config.status --recheck
145

    
146

    
147
${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav                       \
148
                            ${top_srcdir}/demo/demo.jspp                      \
149
                            ${top_srcdir}/demo/enabled.gif                    \
150
                            ${top_srcdir}/demo/favicon.ico                    \
151
                            ${top_srcdir}/demo/keyboard.html                  \
152
                            ${top_srcdir}/demo/keyboard.png                   \
153
                            ${top_srcdir}/demo/styles.css                     \
154
                            ${top_srcdir}/demo/print-styles.css               \
155
                            ${top_srcdir}/demo/vt100.js                       \
156
                            ${top_srcdir}/demo/usercss-0.css                  \
157
                            ${top_srcdir}/demo/usercss-1.css                  \
158
                            ${top_srcdir}/demo/usercss-2.css                  \
159
                            ${top_srcdir}/demo/usercss-3.css
160

    
161
${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
162
	@rm -f "$@"
163
	ln "$?" "$@"
164

    
165
${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif
166
	@rm -f "$@"
167
	ln "$?" "$@"
168

    
169
${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
170
	@rm -f "$@"
171
	ln "$?" "$@"
172

    
173
${top_srcdir}/demo/keyboard.html: ${top_srcdir}/shellinabox/keyboard-layout.html
174
	@rm -f "$@"
175
	ln "$?" "$@"
176

    
177
${top_srcdir}/demo/keyboard.png: ${top_srcdir}/shellinabox/keyboard.png
178
	@rm -f "$@"
179
	ln "$?" "$@"
180

    
181
${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
182
	@rm -f "$@"
183
	sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$?" >"$@"
184

    
185
${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css
186
	@rm -f "$@"
187
	ln "$?" "$@"
188

    
189
${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css
190
	@rm -f "$@"
191
	ln "$?" "$@"
192

    
193
${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css
194
	@rm -f "$@"
195
	ln "$?" "$@"
196

    
197
${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css
198
	@rm -f "$@"
199
	ln "$?" "$@"
200

    
201
${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css
202
	@rm -f "$@"
203
	ln "$?" "$@"
204

    
205
${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
206
	@rm -f "$@"
207
	ln "$?" "$@"
208

    
209
shellinaboxd.1: ${top_srcdir}/shellinabox/shellinaboxd.man.in                 \
210
		${top_srcdir}/config.h
211
	@src="${top_srcdir}/shellinabox/shellinaboxd.man.in";                 \
212
	echo preprocess  "$$src" '>'"$@";                                     \
213
	if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h |           \
214
             grep 'HAVE_BIN_LOGIN' >/dev/null 2>&1; then                      \
215
	  sed -e '/^#ifndef  *HAVE_BIN_LOGIN$$/,/^#endif$$/d' "$$src";        \
216
	else                                                                  \
217
	  sed -e '/^#ifdef  *HAVE_BIN_LOGIN$$/,/^#endif$$/d' "$$src";         \
218
	fi |                                                                  \
219
	if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h |        \
220
             egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
221
             wc -l` -eq 3 ]; then                                             \
222
	  sed -e '/^#ifndef  *HAVE_OPENSSL$$/,/^#endif$$/d';                  \
223
	else                                                                  \
224
	  sed -e '/^#ifdef  *HAVE_OPENSSL$$/,/^#endif$$/d';                   \
225
	fi |                                                                  \
226
	if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h |           \
227
             grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then            \
228
	  sed -e '/^#ifndef  *HAVE_PAM$$/,/^#endif$$/d';                      \
229
	else                                                                  \
230
	  sed -e '/^#ifdef  *HAVE_PAM$$/,/^#endif$$/d';                       \
231
	fi |                                                                  \
232
	if [ -n "${DPKGBUILD}" ]; then                                        \
233
	  sed -e '/^#ifndef  *DPKGBUILD$$/,/^#endif$$/d';                     \
234
	else                                                                  \
235
	  sed -e '/^#ifdef  *DPKGBUILD$$/,/^#endif$$/d';                      \
236
	fi |                                                                  \
237
	sed -e '/^#/d' >"$@"
238
	@out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`;               \
239
	man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
240

    
241
clean-local:
242
	-rm -rf shellinaboxd.1                                                \
243
	        shellinaboxd.ps
244
	-rm -rf debian/shellinabox                                            \
245
	        debian/shellinabox*.debhelper*                                \
246
	        debian/shellinabox.substvars                                  \
247
	        debian/tmp
248
	-rm -rf shellinabox/beep.h                                            \
249
	        shellinabox/cgi_root.h      				      \
250
	        shellinabox/enabled.h       				      \
251
	        shellinabox/favicon.h       				      \
252
	        shellinabox/keyboard.h      				      \
253
	        shellinabox/keyboard-layout.h				      \
254
	        shellinabox/print-styles.h  				      \
255
	        shellinabox/root_page.h     				      \
256
	        shellinabox/shell_in_a_box.h				      \
257
	        shellinabox/styles.h                                          \
258
	        shellinabox/vt100.h
259

    
260
.css.h:
261
	@echo od "$<" '>'"$@"
262
	@mkdir -p "`dirname "$@"`"
263
	@{ sym="`echo "$<" | $(symbolname)`";                                 \
264
	   echo "static const char $${sym}Start[] =";                         \
265
	   od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
266
	   echo ';';                                                          \
267
	   echo "static const int $${sym}Size ATTR_UNUSED ="                  \
268
	           "(int)sizeof($${sym}Start);";                              \
269
	 } >"$@"
270

    
271
.gif.h:
272
	@echo od "$<" '>'"$@"
273
	@mkdir -p "`dirname "$@"`"
274
	@{ sym="`echo "$<" | $(symbolname)`";                                 \
275
	   echo "static const char $${sym}Start[] =";                         \
276
	   od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
277
	   echo ';';                                                          \
278
	   echo "static const int $${sym}Size ATTR_UNUSED ="                  \
279
	           "(int)sizeof($${sym}Start);";                              \
280
	 } >"$@"
281

    
282
.png.h:
283
	@echo od "$<" '>'"$@"
284
	@mkdir -p "`dirname "$@"`"
285
	@{ sym="`echo "$<" | $(symbolname)`";                                 \
286
	   echo "static const char $${sym}Start[] =";                         \
287
	   od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
288
	   echo ';';                                                          \
289
	   echo "static const int $${sym}Size ATTR_UNUSED ="                  \
290
	           "(int)sizeof($${sym}Start);";                              \
291
	 } >"$@"
292

    
293
.html.h:
294
	@echo od "$<" '>'"$@"
295
	@mkdir -p "`dirname "$@"`"
296
	@{ sym="`echo "$<" | $(symbolname)`";                                 \
297
	   echo "static const char $${sym}Start[] =";                         \
298
	   od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
299
	   echo ';';                                                          \
300
	   echo "static const int $${sym}Size ATTR_UNUSED ="                  \
301
	           "(int)sizeof($${sym}Start);";                              \
302
	 } >"$@"
303

    
304

    
305
.ico.h:
306
	@echo od "$<" '>'"$@"
307
	@mkdir -p "`dirname "$@"`"
308
	@{ sym="`echo "$<" | $(symbolname)`";                                 \
309
	   echo "static const char $${sym}Start[] =";                         \
310
	   od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
311
	   echo ';';                                                          \
312
	   echo "static const int $${sym}Size ATTR_UNUSED ="                  \
313
	           "(int)sizeof($${sym}Start);";                              \
314
	 } >"$@"
315

    
316
.jspp.js:
317
	@echo preprocess "$<" "$@"
318
	@mkdir -p "`dirname "$@"`"
319
	sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
320
	             -e t                                                     \
321
	             -e d "$<"`"                                              \
322
	     -e "s/^#/\/\/ #/"                                                \
323
	     -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g"         \
324
	     "$<" >"$@"
325

    
326
.js.h:
327
	@echo od "$<" '>'"$@"
328
	@mkdir -p "`dirname "$@"`"
329
	@{ sym="`echo "$<" | $(symbolname)`";                                 \
330
	   echo "static const char $${sym}Start[] =";                         \
331
	   od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
332
	   echo ';';                                                          \
333
	   echo "static const int $${sym}Size ATTR_UNUSED ="                  \
334
	           "(int)sizeof($${sym}Start);";                              \
335
	 } >"$@"
336

    
337

    
338
.wav.h:
339
	@echo od "$<" '>'"$@"
340
	@mkdir -p "`dirname "$@"`"
341
	@{ sym="`echo "$<" | $(symbolname)`";                                 \
342
	   echo "static const char $${sym}Start[] =";                         \
343
	   od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/  */\\/g';     \
344
	   echo ';';                                                          \
345
	   echo "static const int $${sym}Size ATTR_UNUSED ="                  \
346
	           "(int)sizeof($${sym}Start);";                              \
347
	 } >"$@"
348

    
(7-7/56)