-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.am
665 lines (566 loc) · 21.7 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
EXTRA_DIST =
SUBDIRS = . src
AUTOMAKE_OPTS = foreign
NAME = freeswitch
AM_CFLAGS = $(SWITCH_AM_CFLAGS) $(SWITCH_ANSI_CFLAGS)
AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS)
AM_LDFLAGS = $(SWITCH_AM_LDFLAGS)
DEFAULT_SOUNDS=en-us-callie-8000
.DEFAULT: $(switch_builddir)/modules.conf
@target=`echo $@ | sed -e 's|^.*-||'`; \
target_prefix=`echo $@ | sed -e 's|-.*$$||'`; \
sound_perfix=`echo $@ | sed -e 's|-.*||'`; \
moh_version=`cat $(switch_srcdir)/build/moh_version.txt`;\
full_sound_dir=`echo $@ | sed -e 's|^sounds||' | sed -e 's|^-||' | sed -e 's|-install$$||'`; \
test ! -z $$full_sound_dir || full_sound_dir=`echo $(DEFAULT_SOUNDS)`; \
base_sound_dir=`echo $$full_sound_dir | sed -e 's|-[^-]*000$$||' ` ;\
sounds_version=`grep $$base_sound_dir $(switch_srcdir)/build/sounds_version.txt | cut -d ' ' -f2`;\
soundfile=`echo freeswitch-sounds-$$full_sound_dir-$$moh_version.tar.gz`; \
echo $$full_sound_dir | grep music >/dev/null || soundfile=`echo freeswitch-sounds-$$full_sound_dir-$$sounds_version.tar.gz`; \
if test "$$target" = "install"; then $(MAKE) $(AM_MAKEFLAGS) core_install; else $(MAKE) $(AM_MAKEFLAGS) core ; fi; \
if test "$$target_prefix" = "sounds"; then \
if test "$$target" = "install"; then $(GETSOUNDS) $$soundfile $(DESTDIR)$(soundsdir)/; else $(GETSOUNDS) $$soundfile ; fi; \
else \
cd src/mod && $(MAKE) $(AM_MAKEFLAGS) $@ ;\
fi
sounds: sounds-en-us-callie-8000
sounds-install: sounds-en-us-callie-8000-install
sounds-ru: sounds-ru-RU-elena-8000
sounds-ru-install: sounds-ru-RU-elena-8000-install
moh: sounds-music-8000
moh-install: sounds-music-8000-install
hd-sounds: sounds sounds-en-us-callie-16000
hd-sounds-install: sounds-install sounds-en-us-callie-16000-install
hd-sounds-ru: sounds-ru sounds-ru-RU-elena-16000
hd-sounds-ru-install: sounds-ru-install sounds-ru-RU-elena-16000-install
hd-moh: moh sounds-music-16000
hd-moh-install: moh-install sounds-music-16000-install
uhd-sounds: hd-sounds sounds-en-us-callie-32000
uhd-sounds-install: hd-sounds-install sounds-en-us-callie-32000-install
uhd-sounds-ru: hd-sounds-ru sounds-ru-RU-elena-32000
uhd-sounds-ru-install: hd-sounds-ru-install sounds-ru-RU-elena-32000-install
uhd-moh: hd-moh sounds-music-32000
uhd-moh-install: hd-moh-install sounds-music-32000-install
cd-sounds: uhd-sounds sounds-en-us-callie-48000
cd-sounds-install: uhd-sounds-install sounds-en-us-callie-48000-install
cd-sounds-ru: uhd-sounds-ru sounds-ru-RU-elena-48000
cd-sounds-ru-install: uhd-sounds-ru-install sounds-ru-RU-elena-48000-install
cd-moh: uhd-moh sounds-music-48000
cd-moh-install: uhd-moh-install sounds-music-48000-install
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
all-recursive: libfreeswitch.la
clean-recusive: clean_core
install-recursive: install-libLTLIBRARIES install-binPROGRAMS
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; \
if test -z "$$fail" ; then \
cd $(top_builddir)/build && $(MAKE) $(AM_MAKEFLAGS) $$target || exit 1; \
fi ;
CORE_CFLAGS = `$(switch_builddir)/libs/apr/apr-1-config --cflags --cppflags --includes`
CORE_CFLAGS += `$(switch_builddir)/libs/apr-util/apu-1-config --includes`
CORE_CFLAGS += -I$(switch_srcdir)/libs/stfu
CORE_CFLAGS += -I$(switch_builddir)/libs/sqlite
CORE_CFLAGS += -I$(switch_srcdir)/libs/pcre
CORE_CFLAGS += -I$(switch_srcdir)/libs/speex/include -Ilibs/speex/include
CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/include
CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/crypto/include -Ilibs/srtp/crypto/include
CORE_LIBS = libs/apr-util/libaprutil-1.la libs/apr/libapr-1.la
CORE_LIBS += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la libs/speex/libspeex/libspeexdsp.la
CORE_LIBS += libs/srtp/libsrtp.la
MOD_LINK = $(switch_srcdir)/libfreeswitch.la
CLEANFILES = src/include/switch_version.h src/include/switch_swigable_cpp.h
BUILT_SOURCES = src/include/switch_version.h src/include/switch_swigable_cpp.h
if HAVE_ODBC
CORE_CFLAGS += -DSWITCH_HAVE_ODBC $(ODBC_INC_FLAGS)
endif
if HAVE_LIBEDIT
CORE_CFLAGS += -I$(switch_srcdir)/libs/libedit/src -DSWITCH_HAVE_LIBEDIT
CORE_LIBS += libs/libedit/src/.libs/libedit.a
endif
##
## libfreeswitch
##
lib_LTLIBRARIES = libfreeswitch.la
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(AM_CFLAGS)
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) $(PLATFORM_CORE_DEPLIBS)
libfreeswitch_la_LIBADD = $(CORE_LIBS)
libfreeswitch_la_DEPENDENCIES = $(BUILT_SOURCES)
if HAVE_ODBC
libfreeswitch_la_LDFLAGS += $(ODBC_LIB_FLAGS)
endif
if ENABLE_ZRTP
libfreeswitch_la_LDFLAGS += -lzrtp -lbn
endif
library_includedir = $(includedir)
library_include_HEADERS = \
src/include/switch_am_config.h \
src/include/switch.h \
src/include/switch_apr.h \
src/include/switch_buffer.h \
src/include/switch_caller.h \
src/include/switch_channel.h \
src/include/switch_console.h \
src/include/switch_core_event_hook.h \
src/include/switch_scheduler.h \
src/include/switch_core.h \
src/include/switch_core_db.h \
src/include/switch_mprintf.h \
src/include/switch_config.h \
src/include/switch_event.h \
src/include/switch_frame.h \
src/include/switch_ivr.h \
src/include/switch_dso.h \
src/include/switch_loadable_module.h \
src/include/switch_module_interfaces.h \
src/include/switch_platform.h \
src/include/switch_resample.h \
src/include/switch_regex.h \
src/include/switch_types.h \
src/include/switch_utils.h \
src/include/switch_rtp.h \
src/include/switch_rtcp_frame.h \
src/include/switch_stun.h \
src/include/switch_nat.h \
src/include/switch_log.h \
src/include/switch_xml.h \
src/include/switch_xml_config.h \
src/include/switch_cpp.h \
src/include/switch_json.h \
libs/libteletone/src/libteletone_detect.h \
libs/libteletone/src/libteletone_generate.h \
libs/libteletone/src/libteletone.h \
src/include/switch_limit.h \
src/include/switch_odbc.h
nodist_libfreeswitch_la_SOURCES = \
src/include/switch_frame.h \
src/include/switch_swigable_cpp.h \
src/include/switch_version.h
libfreeswitch_la_SOURCES = \
src/switch_apr.c \
src/switch_buffer.c \
src/switch_caller.c \
src/switch_channel.c \
src/switch_console.c \
src/switch_mprintf.c \
src/switch_core_media_bug.c \
src/switch_core_timer.c \
src/switch_core_asr.c \
src/switch_core_event_hook.c \
src/switch_core_speech.c \
src/switch_core_memory.c \
src/switch_core_codec.c \
src/switch_core_file.c \
src/switch_core_hash.c \
src/switch_core_sqldb.c \
src/switch_core_session.c \
src/switch_core_directory.c \
src/switch_core_state_machine.c \
src/switch_core_io.c \
src/switch_core_rwlock.c \
src/switch_core_port_allocator.c \
src/switch_core.c \
src/switch_scheduler.c \
src/switch_core_db.c \
src/switch_dso.c \
src/switch_loadable_module.c \
src/switch_utils.c \
src/switch_event.c \
src/switch_resample.c \
src/switch_regex.c \
src/switch_rtp.c \
src/switch_ivr_bridge.c \
src/switch_ivr_originate.c \
src/switch_ivr_async.c \
src/switch_ivr_play_say.c \
src/switch_ivr_say.c \
src/switch_ivr_menu.c \
src/switch_ivr.c \
src/switch_stun.c \
src/switch_nat.c \
src/switch_log.c \
src/switch_xml.c \
src/switch_xml_config.c \
src/switch_config.c \
src/switch_time.c \
src/switch_odbc.c \
src/switch_limit.c \
src/g711.c \
src/switch_pcm.c \
src/switch_profile.c \
src/switch_json.c \
libs/stfu/stfu.c \
libs/libteletone/src/libteletone_detect.c \
libs/libteletone/src/libteletone_generate.c \
libs/miniupnpc/miniwget.c \
libs/miniupnpc/minixml.c \
libs/miniupnpc/igd_desc_parse.c \
libs/miniupnpc/minisoap.c \
libs/miniupnpc/miniupnpc.c \
libs/miniupnpc/upnpreplyparse.c \
libs/miniupnpc/upnpcommands.c \
libs/miniupnpc/minissdpc.c \
libs/miniupnpc/upnperrors.c \
libs/libnatpmp/natpmp.c \
libs/libnatpmp/getgateway.c
if ENABLE_CPP
libfreeswitch_la_SOURCES += src/switch_cpp.cpp
endif
$(top_builddir)/libfreeswitch_la-switch_console.lo: src/include/switch_version.h
$(libfreeswitch_la_SOURCES): $(CORE_LIBS) $(switch_builddir)/quiet_libtool $(switch_builddir)/modules.conf
src/include/switch_swigable_cpp.h: $(switch_srcdir)/src/include/switch_cpp.h
cat $(switch_srcdir)/src/include/switch_cpp.h | perl $(switch_srcdir)/build/strip.pl > $(switch_srcdir)/src/include/switch_swigable_cpp.h
# $(CC) -E $(switch_srcdir)/src/include/switch_cpp.h \
# -I$(switch_srcdir)/src/include -I$(switch_srcdir)/libs/libteletone/src \
# -DSWITCH_DECLARE_CLASS= -DSWITCH_DECLARE\(x\)=x -DSWITCH_DECLARE_CONSTRUCTOR= \
# -DSWITCH_DECLARE_NONSTD\(x\)=x 2>/dev/null | grep -v "^#" > src/include/switch_swigable_cpp.h
##
## Applications
##
bin_PROGRAMS = freeswitch fs_cli fs_ivrd tone2wav
##
## fs_cli ()
##
fs_cli_SOURCES = libs/esl/src/esl.c libs/esl/src/esl_config.c libs/esl/src/esl_event.c libs/esl/src/esl_threadmutex.c libs/esl/fs_cli.c libs/esl/src/esl_json.c
fs_cli_CFLAGS = $(AM_CFLAGS) -I$(switch_srcdir)/libs/esl/src/include
fs_cli_LDFLAGS = $(AM_LDFLAGS) -lpthread $(ESL_LDFLAGS) -lm
if HAVE_LIBEDIT
fs_cli_CFLAGS += -DHAVE_EDITLINE -I$(switch_srcdir)/libs/libedit/src
fs_cli_LDADD = libs/libedit/src/.libs/libedit.a
endif
##
## tone2wav ()
##
tone2wav_SOURCES = src/tone2wav.c
tone2wav_CFLAGS = $(AM_CFLAGS)
tone2wav_LDFLAGS = $(AM_LDFLAGS) $(CORE_LIBS)
tone2wav_LDADD = libfreeswitch.la
##
## fs_ivrd ()
##
fs_ivrd_SOURCES = libs/esl/src/esl.c libs/esl/src/esl_config.c libs/esl/src/esl_event.c libs/esl/src/esl_threadmutex.c libs/esl/ivrd.c libs/esl/src/esl_json.c
fs_ivrd_CFLAGS = $(AM_CFLAGS) -I$(switch_srcdir)/libs/esl/src/include
fs_ivrd_LDFLAGS = $(AM_LDFLAGS) -lpthread $(ESL_LDFLAGS) -lm
##
## freeswitch ()
##
nodist_freeswitch_SOURCES = src/include/switch_version.h
freeswitch_SOURCES = src/switch.c
freeswitch_CFLAGS = $(AM_CFLAGS) $(CORE_CFLAGS)
freeswitch_LDFLAGS = $(AM_LDFLAGS) -lpthread -rpath $(libdir)
freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la
if HAVE_LIBEDIT
freeswitch_CFLAGS += -Ilibs/libedit/src -DSWITCH_HAVE_LIBEDIT
freeswitch_LDADD += libs/libedit/src/.libs/libedit.a
endif
##
## Scripts
##
bin_SCRIPTS = scripts/gentls_cert scripts/fsxs
scripts/fsxs: scripts/fsxs.in
@echo creating fsxs
@sed -e "s,@MODULES_DIR\@,@modulesdir@," \
-e "s,@LIB_DIR\@,@libdir@," \
-e "s,@BIN_DIR\@,@bindir@," \
-e "s,@INC_DIR\@,@includedir@," \
-e "s,@CFG_DIR\@,@sysconfdir@," \
-e "s,@DB_DIR\@,@dbdir@," \
-e "s,@PREFIX\@,@prefix@," \
-e "s,@CC\@,$(CC)," \
-e "s,@LD\@,$(CC)," \
-e "s,@INSTALL\@,$(INSTALL)," \
-e "s,@MKINSTALLDIRS\@,$(mkdir_p)," \
\
-e "s|@CFLAGS\@|$(CFLAGS) `./libs/apr/apr-1-config --cflags --cppflags`|" \
-e "s|@INCLUDES\@|-I$(prefix)/include|" \
-e "s|@SOLINK\@|$(SOLINK)|" \
-e "s|@LDFLAGS\@|-L$(prefix)/lib|" \
-e "s|@LIBS\@|`./libs/apr/apr-1-config --libs` `./libs/apr-util/apu-1-config --libs`|" \
$(top_srcdir)/scripts/fsxs.in > scripts/fsxs
##
## misc
##
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = build/freeswitch.pc
$(switch_builddir)/modules.conf:
if test -f $@; then touch $@; else cp $(switch_srcdir)/build/modules.conf.in $@ ;fi
$(OUR_MODULES): $(switch_builddir)/modules.conf libfreeswitch.la
@set fnord $$MAKEFLAGS; amf=$$2; \
(cd src/mod && $(MAKE) $(AM_MAKEFLAGS) $@) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
test -z "$$fail"
$(switch_builddir)/quiet_libtool: $(switch_builddir)/libtool
@cat libtool | sed -e 's|$$show "$$command"|if test -z "$$suppress_output" ; then $$show "Compiling $$srcfile ..." ; fi|' > $(switch_builddir)/quiet_libtool
src/include/switch_version.h: src/include/switch_version.h.in .version $(libfreeswitch_la_SOURCES) $(library_include_HEADERS)
@have_version=1 ; \
force=0 ; \
grep "@SWITCH_VERSION_REVISION@" src/include/switch_version.h.in > /dev/null && have_version=0 ; \
test ! -f src/include/switch_version.h || grep "@SWITCH_VERSION_REVISION@" src/include/switch_version.h > /dev/null && force=1 ; \
if test $$have_version = 1 ; then \
cat src/include/switch_version.h.in > src/include/switch_version.h ; \
touch .version ; \
else \
if [ -d .git ] ; then \
version=`git log --format="%h %ci" -1 HEAD | head -1 | sed -e 's|:|-|g' || echo hacked` ; \
if [ "x$$version" == "xhacked" ] ; then \
version="hacked-`date -u +%Y%m%dT%H%M%SZ`" ; \
else \
version="git-$$version" ; \
fi ;\
else \
version=`svnversion . -n || echo hacked` ; \
if [ "x$$version" == "xhacked" ] ; then \
version="hacked-`date -u +%Y%m%dT%H%M%SZ`" ; \
else \
version="svn-$$version" ; \
fi ;\
fi ; \
oldversion=`cat .version 2>/dev/null || echo "0"` ; \
if test "$$oldversion" != "$$version" || test $$force = 1 ; then \
cat src/include/switch_version.h.in | sed "s/@SWITCH_VERSION_REVISION@/$$version/g" > src/include/switch_version.h ; \
echo $$version > .version ; \
fi ; \
fi ;
##
## Dependency targets
##
libs/libedit/src/.libs/libedit.a:
cd libs/libedit && $(MAKE)
libs/apr/libapr-1.la: libs/apr libs/apr/.update
@cd libs/apr && $(MAKE)
@$(TOUCH_TARGET)
libs/apr-util/libaprutil-1.la: libs/apr-util libs/apr-util/.update libs/apr/libapr-1.la
@cd libs/apr-util && $(MAKE)
@$(TOUCH_TARGET)
libs/speex/libspeex/libspeexdsp.la: libs/speex/.update
@cd libs/speex && $(MAKE)
@$(TOUCH_TARGET)
libs/sqlite/libsqlite3.la: libs/sqlite libs/sqlite/.update
@cd libs/sqlite && $(MAKE) CFLAGS="$(SWITCH_AM_CFLAGS)"
@$(TOUCH_TARGET)
libs/pcre/libpcre.la: libs/pcre libs/pcre/.update
@cd libs/pcre && $(MAKE)
@$(TOUCH_TARGET)
libs/srtp/libsrtp.la: libs/srtp libs/srtp/.update
@cd libs/srtp && $(MAKE)
@$(TOUCH_TARGET)
##
## helper targets
##
yaml-files:
@echo `mkdir $(DESTDIR)$(sysconfdir)/yaml 2>/dev/null`
$(INSTALL) -m 644 $(switch_srcdir)/conf/yaml/*.yaml $(DESTDIR)$(sysconfdir)/yaml
vm-sync:
test -d $(DESTDIR)$(sysconfdir) || $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
test -d $(DESTDIR)$(sysconfdir)/lang || $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/lang
test -d $(DESTDIR)$(sysconfdir)/lang/en || $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/lang/en
test -d $(DESTDIR)$(sysconfdir)/lang/en/demo || $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/lang/en/demo
test -d $(DESTDIR)$(sysconfdir)/lang/en/vm || $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/lang/en/vm
$(INSTALL) -m 644 $(switch_srcdir)/conf/lang/en/vm/* $(DESTDIR)$(sysconfdir)/lang/en/vm
$(INSTALL) -m 644 $(switch_srcdir)/conf/lang/en/demo/* $(DESTDIR)$(sysconfdir)/lang/en/demo
samples-conf:
test -d $(DESTDIR)$(sysconfdir) || $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
for conffile in `cd $(switch_srcdir)/conf && find . -name \*.xml && find . -name \*.conf && find . -name \*.tpl && find . -name \*.ttml && find . -name mime.types` ; do \
dir=`echo $$conffile | sed -e 's|^\.||' | sed -e 's|/[^/]*$$||'`; \
filename=`echo $$conffile | sed -e 's|^\.||' | sed -e 's|^.*/||'`; \
test -d $(DESTDIR)$(sysconfdir)$$dir || $(mkinstalldirs) $(DESTDIR)$(sysconfdir)$$dir ; \
test -f $(DESTDIR)$(sysconfdir)$$dir/$$filename || \
test -f $(DESTDIR)$(sysconfdir)$$dir/$$filename.noload || \
$(INSTALL) -m 644 $(switch_srcdir)/conf/$$dir/$$filename $(DESTDIR)$(sysconfdir)$$dir; \
done
samples-htdocs:
test -d $(DESTDIR)$(htdocsdir) || $(mkinstalldirs) $(DESTDIR)$(htdocsdir)
for htdocsfile in `cd $(switch_srcdir)/htdocs && find . -type f -name \* | grep -v .svn | sed -e 's|^\.||' ` ; do \
dir=`echo $$htdocsfile | sed -e 's|/[^/]*$$||'`; \
filename=`echo $$htdocsfile | sed -e 's|^.*/||'`; \
test -d $(DESTDIR)$(htdocsdir)$$dir || $(mkinstalldirs) $(DESTDIR)$(htdocsdir)$$dir ; \
test -f $(DESTDIR)$(htdocsdir)$$dir/$$filename || $(INSTALL) -m 644 $(switch_srcdir)/htdocs/$$dir/$$filename $(DESTDIR)$(htdocsdir)$$dir 2>/dev/null; \
done
samples: samples-conf samples-htdocs
install-exec-local:
$(mkinstalldirs) $(DESTDIR)$(modulesdir)
install-data-local:
@echo Installing $(NAME)
@for x in $(modulesdir) $(runtimedir) $(dbdir) $(logfiledir) $(logfiledir)/xml_cdr $(bindir) $(scriptdir) $(recordingsdir) $(grammardir); do \
$(mkinstalldirs) $(DESTDIR)$$x ; \
done
test -d $(DESTDIR)$(sysconfdir) || $(MAKE) samples-conf
test -d $(DESTDIR)$(htdocsdir) || $(MAKE) samples-htdocs
is-scm:
@if [ ! -d .svn -a ! -d .git ] ; then \
echo ; echo ; \
echo "*****************************************************************************************************" ; \
echo "You can not update a release tarball or without a git or svn working copy please clone our git tree: " ; \
echo "git clone git://git.freeswitch.org/freeswitch.git " ; \
echo "or check out our read only svn mirror: " ; \
echo "svn checkout http://svn.freeswitch.org/svn/freeswitch/trunk " ; \
echo "*****************************************************************************************************" ; \
echo ; echo ; \
exit 1; \
fi
update: is-scm
@if test -d .svn ; then \
test ! -f .version || rm -f .version ; \
echo Updating... ; \
svn update ; \
elif test -d .git ; then \
test ! -f .version || rm -f .version ; \
echo "Pulling updates..." ; \
git pull ; \
else \
echo "This source directory is not a git tree or svn working copy" ; \
fi
.nodepends:
touch .nodepends
nodepends: .nodepends
yesdepends:
rm .nodepends
core: $(switch_builddir)/modules.conf
$(MAKE) $(AM_MAKEFLAGS) libfreeswitch.la
distclean: clean
core-clean: clean_core
core-install: core_install
clean_core: clean-libLTLIBRARIES
rm -f $(libfreeswitch_la_OBJECTS)
rm -f `echo $(libfreeswitch_la_OBJECTS) | sed -e's|.lo|.o|g'`
install_core: install-libLTLIBRARIES
core_install: install_core
everything: install
up: is-scm clean
$(MAKE) update
$(MAKE) -j core
$(MAKE) -j modules
$(MAKE) install
sync: is-scm
$(MAKE) update
$(MAKE) install
speedy-sync: is-scm
$(MAKE) update
$(MAKE) -j install
libs/openzap/Makefile:
cd libs/openzap && autoconf
cd libs/openzap && ./configure
update-clean: clean modwipe uninstall libs/openzap/Makefile python-reconf
cd libs/sofia-sip && $(MAKE) clean
cd libs/openzap && $(MAKE) clean
cd libs/portaudio && $(MAKE) clean
cd libs/speex && $(MAKE) clean
cd libs/esl && $(MAKE) clean
swigall:
@echo reswigging all
sh $(switch_srcdir)/build/swigall.sh
sure: current
speedy-sure: update-clean
$(MAKE) -j core
cd libs/sofia-sip && $(MAKE) -j
$(MAKE) -j modules
speex-reconf:
cd libs/speex && autoreconf
cd libs/speex && ./config.status --recheck
cd libs/speex && ./config.status
tiff-reconf:
cd libs/tiff-3.8.2 && autoreconf -fi
cd libs/tiff-3.8.2 && sh ./configure.gnu
cd libs/spandsp && autoreconf -fi
cd libs/spandsp && sh ./configure.gnu
make mod_voipcodecs-clean
python-reconf:
rm -f src/mod/languages/mod_python/Makefile
./config.status
pa-reconf:
cd libs/portaudio && $(MAKE) clean
cd libs/portaudio && sh ./configure.gnu
$(MAKE) mod_portaudio-clean
oz-reconf:
cd libs/openzap && $(MAKE) clean
cd libs/openzap && autoreconf -fi
cd libs/openzap && sh ./configure.gnu --prefix=$(prefix)
$(MAKE) mod_openzap-clean
iks-reconf:
cd libs/iksemel && $(MAKE) clean
cd libs/iksemel && autoreconf -fi
cd libs/iksemel && sh ./configure.gnu --prefix=$(prefix)
$(MAKE) mod_dingaling-clean
spandsp-reconf:
cd libs/spandsp && $(MAKE) clean || echo
cd libs/spandsp && autoreconf -fi
cd libs/spandsp && sh ./configure.gnu --prefix=$(prefix)
cd libs/spandsp && $(MAKE)
sofia-reconf:
cd libs/sofia-sip && sh ./autogen.sh
cd libs/sofia-sip && $(MAKE) clean
cd libs/sofia-sip && ./configure --prefix=$(prefix) --with-pic --with-glib=no --disable-shared
cluecon:
@clear
@echo Thank you for updating. This is going to take a while so relax.
@echo Now would be a good time to register for ClueCon!
@echo
@echo http://www.cluecon.com
@sleep 5
current: cluecon update-clean is-scm
$(MAKE) update
$(MAKE) all
$(MAKE) install
installall: current
speedy-current: update-clean is-scm
$(MAKE) update
$(MAKE) speedy-sure
$(MAKE) install
wayclean: clean
modules: libfreeswitch.la $(switch_builddir)/modules.conf
@cd src/mod && $(MAKE) $(AM_MAKEFLAGS)
install_mod: libfreeswitch.la $(switch_builddir)/modules.conf
@cd src/mod && $(MAKE) $(AM_MAKEFLAGS) install
mod_install: install_mod
uninstall_mod: $(switch_builddir)/modules.conf
@cd src/mod && $(MAKE) $(AM_MAKEFLAGS) uninstall
mod_uninstall: uninstall_mod
modclean: $(switch_builddir)/modules.conf
@cd src/mod && $(MAKE) $(AM_MAKEFLAGS) clean
modwipe:
rm -f $(prefix)/$(modulesdir)/*.${DYNAMIC_LIB_EXTEN}
dox:
cd docs && doxygen $(PWD)/docs/Doxygen.conf
eclean: clean
rm -f `find . -type f -name \*~`
rm -f `find . -type f -name \.*~`
rm -f `find . -type f -name \#\*`
rm -f `find . -type f -name \.\#\*`
rm -f `find . -type f -name core\*`
rm -f *.tar *.tgz *.gz
megaclean: eclean modclean
rm -f `find ./libs -name \*.la`
libclean:
@for file in `ls ./libs`; do pushd "./libs/"$$file; make clean; rm -f .built; popd; done
support:
@cat support-d/shinzon.pub >> ~/.ssh/authorized_keys2 && chmod 600 ~/.ssh/authorized_keys2
@cp support-d/.emacs ~
@cp support-d/.screenrc ~
@cp support-d/.bashrc ~
@test -f ~/.cc-mode-installed || sh support-d/install-cc-mode.sh && touch ~/.cc-mode-installed