]> andersk Git - test.git/blame - Makefile.am
Added --pidfile= option that can be used even if running in the foreground.
[test.git] / Makefile.am
CommitLineData
7460295f 1AM_CPPFLAGS =
c593cf68 2AM_CFLAGS = -g -std=gnu99 -Wall
3bf14b3a 3AM_LDFLAGS = -g -lm
7460295f 4
bc83b450 5OBJCOPY ?= objcopy
59edd9ef 6OBJDUMP ?= objdump
bc83b450 7
7460295f
MG
8noinst_LTLIBRARIES = libhttp.la \
9 liblogging.la
c593cf68 10noinst_DATA = $(top_srcdir)/demo/demo.js
7460295f
MG
11bin_PROGRAMS = shellinaboxd
12man_MANS = shellinaboxd.1
13noinst_HEADERS = libhttp/http.h
14dist_doc_DATA = AUTHORS \
15 COPYING \
16 GPL-2 \
17 ChangeLog \
18 INSTALL \
19 NEWS \
20 README \
1f771613 21 TODO \
08db8657
MG
22 shellinabox/white-on-black.css \
23 shellinabox/black-on-white.css \
24 shellinabox/monochrome.css \
25 shellinabox/color.css
09c5d6e3
MG
26EXTRA_DIST = INSTALL.Debian \
27 README.Fedora \
28 demo/beep.wav \
c593cf68
MG
29 demo/favicon.ico \
30 demo/demo.html \
31 demo/demo.js \
32 demo/demo.jspp \
c82a11e7 33 demo/demo.xml \
08db8657 34 demo/enabled.gif \
c73698b6 35 demo/keyboard.png \
c593cf68 36 demo/styles.css \
db50e572 37 demo/print-styles.css \
c593cf68 38 demo/vt100.js \
08db8657
MG
39 demo/usercss-0.css \
40 demo/usercss-1.css \
41 demo/usercss-2.css \
42 demo/usercss-3.css \
09c5d6e3 43 etc-pam.d-shellinabox-example \
c593cf68 44 shellinabox/shellinaboxd.man.in \
c27d0db9
MG
45 shellinabox/shell_in_a_box.js \
46 shellinabox/vt100.js \
fd239d93 47 shellinabox/cgi-mode-example.sh \
7460295f 48 debian/README \
e7372536
MG
49 debian/README.available \
50 debian/README.enabled \
7460295f
MG
51 debian/changelog \
52 debian/compat \
53 debian/control \
54 debian/copyright \
55 debian/docs \
56 debian/rules \
57 debian/shellinabox.default \
58 debian/shellinabox.dirs \
59 debian/shellinabox.init \
60 debian/shellinabox.install \
61 debian/shellinabox.postinst \
f77e8221 62 debian/shellinabox.postrm \
dfde103c 63 debian/source/format \
f77e8221 64 debian/watch
bdd01e84
MG
65LIBLOGGING_INCLUDES = logging/logging.h \
66 config.h
7460295f
MG
67liblogging_la_SOURCES= logging/logging.c \
68 $(LIBLOGGING_INCLUDES)
69liblogging_la_LDFLAGS= -version 1:0:0
70
71LIBHTTP_INCLUDES = libhttp/hashmap.h \
72 libhttp/trie.h \
73 libhttp/httpconnection.h \
74 libhttp/server.h \
75 libhttp/ssl.h \
bdd01e84
MG
76 libhttp/url.h \
77 config.h
7460295f
MG
78libhttp_la_SOURCES = libhttp/hashmap.c \
79 libhttp/trie.c \
80 libhttp/httpconnection.c \
81 libhttp/server.c \
82 libhttp/ssl.c \
83 libhttp/url.c \
84 $(LIBHTTP_INCLUDES) \
85 libhttp/libhttp.sym
86libhttp_la_LDFLAGS = -export-symbols $(top_srcdir)/libhttp/libhttp.sym \
29135474 87 -version 1:0:0
7460295f
MG
88
89shellinaboxd_SOURCES = shellinabox/shellinaboxd.c \
90 shellinabox/externalfile.c \
91 shellinabox/externalfile.h \
92 shellinabox/launcher.c \
93 shellinabox/launcher.h \
94 shellinabox/privileges.c \
95 shellinabox/privileges.h \
96 shellinabox/service.c \
97 shellinabox/service.h \
98 shellinabox/session.c \
99 shellinabox/session.h \
ecbff9b9
MG
100 shellinabox/usercss.c \
101 shellinabox/usercss.h \
d1edcc0e 102 shellinabox/cgi_root.html \
7460295f 103 shellinabox/root_page.html \
c27d0db9
MG
104 shellinabox/vt100.jspp \
105 shellinabox/shell_in_a_box.jspp \
7460295f 106 shellinabox/styles.css \
db50e572 107 shellinabox/print-styles.css \
08db8657 108 shellinabox/enabled.gif \
7460295f 109 shellinabox/favicon.ico \
c73698b6
MG
110 shellinabox/keyboard.png \
111 shellinabox/keyboard-layout.html \
bdd01e84
MG
112 shellinabox/beep.wav \
113 config.h
7460295f
MG
114shellinaboxd_LDADD = liblogging.la \
115 libhttp.la
29135474 116shellinaboxd_LDFLAGS = -static
7460295f 117
1a29881f 118objcopyflags = case "$(host_cpu)" in \
8bde68b8
MG
119 i[0-9]86)echo '-O elf32-i386 -B i386';; \
120 x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
8bde68b8
MG
121 *) trap 'rm -f /tmp/probe$$$$.o' EXIT; \
122 $(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc \
123 -o /tmp/probe$$$$.o /dev/null && \
59edd9ef 124 $(OBJDUMP) -f /tmp/probe$$$$.o | \
8bde68b8
MG
125 sed -e 's/.*file format */-O /;t; \
126 s/architecture: *\([^,]*\).*/-B \1/;t; \
127 d';; \
1a29881f
MG
128 esac
129
130renamesymbols = \
131 sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
132 -e 't0' \
133 -e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
134 -e 't0' \
135 -e 's/.*/&=& /' \
136 -e ':0' \
137 -e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
138 -e ':1' \
db50e572 139 -e 's/\(=[^-_]*\)[-_]\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
1a29881f
MG
140 -e 't1' \
141 -e 's/.\{53\}$$//' \
db50e572 142 -e 's/[-/.]/_/g' \
1a29881f
MG
143 -e 's/^/--redefine-sym _binary_/' \
144 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
145 -e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
146 -e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
147
7460295f
MG
148libtool: $(LIBTOOL_DEPS)
149 $(SHELL) ./config.status --recheck
150
5d21b406
MG
151
152${top_srcdir}/demo/demo.js: ${top_srcdir}/demo/beep.wav \
153 ${top_srcdir}/demo/demo.jspp \
c73698b6 154 ${top_srcdir}/demo/enabled.gif \
5d21b406 155 ${top_srcdir}/demo/favicon.ico \
c73698b6 156 ${top_srcdir}/demo/keyboard.png \
5d21b406 157 ${top_srcdir}/demo/styles.css \
db50e572 158 ${top_srcdir}/demo/print-styles.css \
08db8657
MG
159 ${top_srcdir}/demo/vt100.js \
160 ${top_srcdir}/demo/usercss-0.css \
161 ${top_srcdir}/demo/usercss-1.css \
162 ${top_srcdir}/demo/usercss-2.css \
163 ${top_srcdir}/demo/usercss-3.css
5d21b406
MG
164
165${top_srcdir}/demo/beep.wav: ${top_srcdir}/shellinabox/beep.wav
166 @rm -f "$@"
dac74dcd 167 ln "$?" "$@"
5d21b406 168
08db8657
MG
169${top_srcdir}/demo/enabled.gif: ${top_srcdir}/shellinabox/enabled.gif
170 @rm -f "$@"
dac74dcd 171 ln "$?" "$@"
08db8657 172
5d21b406
MG
173${top_srcdir}/demo/favicon.ico: ${top_srcdir}/shellinabox/favicon.ico
174 @rm -f "$@"
dac74dcd 175 ln "$?" "$@"
5d21b406 176
c73698b6
MG
177${top_srcdir}/demo/keyboard.png: ${top_srcdir}/shellinabox/keyboard.png
178 @rm -f "$@"
179 ln "$?" "$@"
180
5d21b406
MG
181${top_srcdir}/demo/styles.css: ${top_srcdir}/shellinabox/styles.css
182 @rm -f "$@"
dac74dcd 183 sed -e '/\[if DEFINES_COLORS\]/,/\[endif DEFINES_COLORS\]/d' "$?" >"$@"
5d21b406 184
db50e572
MG
185${top_srcdir}/demo/print-styles.css: ${top_srcdir}/shellinabox/print-styles.css
186 @rm -f "$@"
dac74dcd 187 ln "$?" "$@"
db50e572 188
08db8657
MG
189${top_srcdir}/demo/usercss-0.css: ${top_srcdir}/shellinabox/white-on-black.css
190 @rm -f "$@"
dac74dcd 191 ln "$?" "$@"
08db8657
MG
192
193${top_srcdir}/demo/usercss-1.css: ${top_srcdir}/shellinabox/black-on-white.css
194 @rm -f "$@"
dac74dcd 195 ln "$?" "$@"
08db8657
MG
196
197${top_srcdir}/demo/usercss-2.css: ${top_srcdir}/shellinabox/monochrome.css
198 @rm -f "$@"
dac74dcd 199 ln "$?" "$@"
08db8657
MG
200
201${top_srcdir}/demo/usercss-3.css: ${top_srcdir}/shellinabox/color.css
202 @rm -f "$@"
dac74dcd 203 ln "$?" "$@"
08db8657 204
5d21b406
MG
205${top_srcdir}/demo/vt100.js: ${top_srcdir}/shellinabox/vt100.js
206 @rm -f "$@"
dac74dcd 207 ln "$?" "$@"
5d21b406 208
c73698b6
MG
209shellinaboxd.1: ${top_srcdir}/shellinabox/shellinaboxd.man.in \
210 ${top_srcdir}/config.h
29135474
MG
211 @src="${top_srcdir}/shellinabox/shellinaboxd.man.in"; \
212 echo preprocess "$$src" '>'"$@"; \
2eb60237
MG
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 | \
c27d0db9 219 if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
bf1ec4d2
MG
220 egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\
221 wc -l` -eq 3 ]; then \
2eb60237 222 sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d'; \
29135474 223 else \
2eb60237 224 sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d'; \
2809cd15 225 fi | \
c27d0db9 226 if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \
bf1ec4d2 227 grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \
2809cd15 228 sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \
bf1ec4d2 229 else \
2809cd15
MG
230 sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \
231 fi | \
1f771613
MG
232 if [ -n "${DPKGBUILD}" ]; then \
233 sed -e '/^#ifndef *DPKGBUILD$$/,/^#endif$$/d'; \
234 else \
235 sed -e '/^#ifdef *DPKGBUILD$$/,/^#endif$$/d'; \
236 fi | \
2809cd15 237 sed -e '/^#/d' >"$@"
bf1ec4d2
MG
238 @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \
239 man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}"
7460295f
MG
240
241clean-local:
242 -rm -rf shellinaboxd.1 \
2837d5e3 243 shellinaboxd.ps
7460295f 244 -rm -rf debian/shellinabox \
2837d5e3 245 debian/shellinabox*.debhelper* \
7460295f 246 debian/shellinabox.substvars \
2837d5e3
MG
247 debian/tmp
248 -rm -rf GNU-stack
7460295f
MG
249
250.css.o:
bc83b450
MG
251 @echo $(OBJCOPY) "$<" "$@"
252 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
08db8657 253 "$<" "$@"
2837d5e3 254 @-printf '\000' >GNU-stack && \
bc83b450 255 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
2837d5e3 256 rm -f GNU-stack
08db8657
MG
257
258.gif.o:
bc83b450
MG
259 @echo $(OBJCOPY) "$<" "$@"
260 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
7460295f 261 "$<" "$@"
2837d5e3 262 @-printf '\000' >GNU-stack && \
bc83b450 263 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
2837d5e3
MG
264 rm -f GNU-stack
265
c73698b6
MG
266.png.o:
267 @echo $(OBJCOPY) "$<" "$@"
268 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
269 "$<" "$@"
270 @-printf '\000' >GNU-stack && \
271 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
272 rm -f GNU-stack
7460295f
MG
273
274.html.o:
bc83b450
MG
275 @echo $(OBJCOPY) "$<" "$@"
276 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
7460295f 277 "$<" "$@"
2837d5e3 278 @-printf '\000' >GNU-stack && \
bc83b450 279 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
2837d5e3
MG
280 rm -f GNU-stack
281
7460295f
MG
282
283.ico.o:
bc83b450
MG
284 @echo $(OBJCOPY) "$<" "$@"
285 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
7460295f 286 "$<" "$@"
2837d5e3 287 @-printf '\000' >GNU-stack && \
bc83b450 288 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
2837d5e3
MG
289 rm -f GNU-stack
290
7460295f 291
c73698b6
MG
292shellinabox/shell_in_a_box.o: ${top_srcdir}/shellinabox/shell_in_a_box.js \
293 ${top_srcdir}/config.h
294
295${top_srcdir}/shellinabox/vt100.js: ${top_srcdir}/shellinabox/vt100.jspp \
296 ${top_srcdir}/shellinabox/keyboard-layout.html
3b5fc7f9 297
c27d0db9 298.jspp.js:
572ac014 299 @echo preprocess "$<" "$@"
c73698b6
MG
300 @kbd=`while read i; do \
301 printf '%s' "\`echo "$$i" | sed 's/&/\\\\\\&/g'\`"; \
302 done <${top_srcdir}/shellinabox/keyboard-layout.html`; \
303 sed -e "`sed -e 's/^#define *\([^ ]*\) *\(.*\)/\/^[^#]\/s\/\1\/\2 \\\\\/* \1 *\\\\\/\/g/' \
29135474
MG
304 -e t \
305 -e d "$<"`" \
306 -e "s/^#/\/\/ #/" \
fe338aa8 307 -e "s/VERSION/\"@VERSION@ (revision @VCS_REVISION@)\"/g" \
c73698b6 308 -e "s%KEYBOARD%'$${kbd}'%" \
1a29881f 309 "$<" >"$@"
c27d0db9
MG
310
311.js.o:
bc83b450
MG
312 @echo $(OBJCOPY) "$<" "$@"
313 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
c27d0db9 314 "$<" "$@"
2837d5e3 315 @-printf '\000' >GNU-stack && \
bc83b450 316 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
2837d5e3
MG
317 rm -f GNU-stack
318
7460295f
MG
319
320.wav.o:
bc83b450
MG
321 @echo $(OBJCOPY) "$<" "$@"
322 @$(OBJCOPY) -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)`\
7460295f 323 "$<" "$@"
2837d5e3 324 @-printf '\000' >GNU-stack && \
bc83b450 325 $(OBJCOPY) --add-section .note.GNU-stack=GNU-stack "$@"; \
2837d5e3
MG
326 rm -f GNU-stack
327
7460295f 328
This page took 1.00584 seconds and 5 git commands to generate.