From: Kevin P. Fleming Date: Wed, 26 Nov 2008 18:36:24 +0000 (+0000) Subject: simplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode X-Git-Tag: 1.4.23-rc2~3^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7459a56dbb35553fe7b124f4385d952e7d564b9d;p=thirdparty%2Fasterisk.git simplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode add channels/busy.h and channels/ringtone.h to the repository instead of generating them repeatedtly; most users do not change the settings to build them, but the Makefile rules are still there if they wish to do so ensure that 'make clean' removes dependency files for .i files that are created in COMPILE_DOUBLE mode git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159476 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules index f79a8b64e7..a0738fecbf 100644 --- a/Makefile.moddir_rules +++ b/Makefile.moddir_rules @@ -65,7 +65,7 @@ modules.link: clean:: rm -f *.so *.o *.oo *.s *.i *.ii - rm -f .*.o.d .*.oo.d + rm -f .*.d rm -f modules.link install:: all @@ -76,7 +76,6 @@ uninstall:: dist-clean:: rm -f .*.moduleinfo .moduleinfo rm -f .*.makeopts .makeopts - rm -f .*.d .%.moduleinfo: %.c @echo "" > $@ diff --git a/Makefile.rules b/Makefile.rules index 387420f321..e4b174577f 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -19,6 +19,11 @@ .PHONY: dist-clean +# If 'make' decides to create intermediate files to satisfy a build requirement +# (like producing a .i from a .c), we want to keep them, so tell make to keep +# all intermediate files +.SECONDARY: + # extra cflags to build dependencies. Recursively expanded. MAKE_DEPS=-MD -MT $@ -MF .$(subst /,_,$@).d -MP @@ -74,13 +79,9 @@ ifeq ($(COMPILE_DOUBLE),yes) endif $(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) +ifneq ($(COMPILE_DOUBLE),yes) %.o: %.c $(ECHO_PREFIX) echo " [CC] $< -> $@" -ifeq ($(COMPILE_DOUBLE),yes) - $(CMD_PREFIX) $(CC) -o $(@:%.o=%.i) -E $< $(CC_CFLAGS) $(MAKE_DEPS) - $(CMD_PREFIX) $(CC) -o /dev/null -c $(@:%.o=%.i) $(CC_CFLAGS) $(OPTIMIZE) - $(CMD_PREFIX) $(CC) -o $@ -c $(@:%.o=%.i) $(CC_CFLAGS) -else $(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(MAKE_DEPS) endif @@ -95,13 +96,9 @@ ifeq ($(COMPILE_DOUBLE),yes) endif $(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) +ifneq ($(COMPILE_DOUBLE),yes) %.oo: %.cc $(ECHO_PREFIX) echo " [CXX] $< -> $@" -ifeq ($(COMPILE_DOUBLE),yes) - $(CMD_PREFIX) $(CXX) -o $(@:%.oo=%.ii) -E $< $(CXX_CFLAGS) $(MAKE_DEPS) - $(CMD_PREFIX) $(CXX) -o /dev/null -c $(@:%.oo=%.ii) $(CXX_CFLAGS) $(MAKE_DEPS) $(OPTIMIZE) - $(CMD_PREFIX) $(CXX) -o $@ -c $(@:%.oo=%.ii) $(CXX_CFLAGS) $(MAKE_DEPS) -else $(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) $(MAKE_DEPS) endif diff --git a/agi/Makefile b/agi/Makefile index c24c7f1006..7a13d22415 100644 --- a/agi/Makefile +++ b/agi/Makefile @@ -39,7 +39,7 @@ uninstall: clean: rm -f *.so *.o look eagi-test eagi-sphinx-test - rm -f .*.o.d .*.oo.d *.s *.i + rm -f .*.d *.s *.i rm -f strcompat.c ifneq ($(wildcard .*.d),) diff --git a/channels/Makefile b/channels/Makefile index d46632e01f..e2cadfa131 100644 --- a/channels/Makefile +++ b/channels/Makefile @@ -66,7 +66,7 @@ all: _all include $(ASTTOPDIR)/Makefile.moddir_rules clean:: - rm -f busy.h ringtone.h gentone + rm -f gentone $(MAKE) -C misdn clean ifneq ($(wildcard h323/Makefile.ast),) @@ -94,18 +94,14 @@ gentone: gentone.c $(CMD_PREFIX) $(HOST_CC) $(STATIC_BUILD) -o $@ $(HOST_CFLAGS) $(HOST_LDFLAGS) $^ $(LIBS) gentone: LIBS+=-lm -busy.h: gentone +busy.h: ./gentone busy 480 620 -ringtone.h: gentone +ringtone.h: ./gentone ringtone 440 480 -chan_oss.o: busy.h ringtone.h - $(if $(filter chan_iax2,$(EMBEDDED_MODS)),modules.link,chan_iax2.so): iax2-parser.o iax2-provision.o -chan_alsa.o: busy.h ringtone.h - ifeq ($(OSARCH),linux-gnu) chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast $(ECHO_PREFIX) echo " [LD] $^ -> $@" diff --git a/channels/busy.h b/channels/busy.h new file mode 100644 index 0000000000..6e5db8e47e --- /dev/null +++ b/channels/busy.h @@ -0,0 +1,55 @@ +/* busy.h: Generated from frequencies 480 and 620 + by gentone. 400 samples */ +static short busy[400] = { + 0, 13697, 24766, 31109, 31585, 26222, 16198, 3569, + -9162, -19575, -25812, -26935, -23069, -15322, -5493, 4339, + 12277, 16985, 17934, 15440, 10519, 4585, -908, -4827, + -6592, -6269, -4489, -2220, -467, 30, -983, -3203, + -5839, -7844, -8215, -6301, -2035, 3975, 10543, 16141, + 19260, 18787, 14322, 6338, -3845, -14296, -22858, -27611, + -27309, -21691, -11585, 1213, 14285, 25068, 31388, 31915, + 26457, 16010, 2568, -11282, -22885, -30054, -31509, -27120, + -17908, -5805, 6760, 17379, 24147, 26028, 23020, 16094, + 6931, -2478, -10279, -15136, -16474, -14538, -10253, -4949, + 0, 3515, 5052, 4688, 3045, 1069, -268, -272, + 1269, 3996, 7067, 9381, 9889, 7910, 3365, -3123, + -10320, -16622, -20424, -20510, -16384, -8448, 2006, 13026, + 22383, 28040, 28613, 23696, 13996, 1232, -12193, -23670, + -30918, -32459, -27935, -18190, -5103, 8795, 20838, 28764, + 31164, 27753, 19395, 7893, -4412, -15136, -22342, -24909, + -22717, -16609, -8143, 780, 8361, 13272, 14909, 13455, + 9758, 5067, 678, -2387, -3624, -3133, -1538, 224, + 1209, 751, -1315, -4580, -8145, -10848, -11585, -9628, + -4878, 2038, 9844, 16867, 21403, 22124, 18429, 10638, + 0, -11524, -21643, -28211, -29702, -25561, -16364, -3737, + 9946, 22044, 30180, 32733, 29182, 20210, 7573, -6269, + -18655, -27259, -30558, -28117, -20645, -9807, 2148, 12878, + 20426, 23599, 22173, 16865, 9117, 731, -6552, -11426, + -13269, -12216, -9050, -4941, -1118, 1460, 2335, 1635, + 0, -1635, -2335, -1460, 1118, 4941, 9050, 12216, + 13269, 11426, 6552, -731, -9117, -16865, -22173, -23599, + -20426, -12878, -2148, 9807, 20645, 28117, 30558, 27259, + 18655, 6269, -7573, -20210, -29182, -32733, -30180, -22044, + -9946, 3737, 16364, 25561, 29702, 28211, 21643, 11524, + 0, -10638, -18429, -22124, -21403, -16867, -9844, -2038, + 4878, 9628, 11585, 10848, 8145, 4580, 1315, -751, + -1209, -224, 1538, 3133, 3624, 2387, -678, -5067, + -9758, -13455, -14909, -13272, -8361, -780, 8143, 16609, + 22717, 24909, 22342, 15136, 4412, -7893, -19395, -27753, + -31164, -28764, -20838, -8795, 5103, 18190, 27935, 32459, + 30918, 23670, 12193, -1232, -13996, -23696, -28613, -28040, + -22383, -13026, -2006, 8448, 16384, 20510, 20424, 16622, + 10320, 3123, -3365, -7910, -9889, -9381, -7067, -3996, + -1269, 272, 268, -1069, -3045, -4688, -5052, -3515, + 0, 4949, 10253, 14538, 16474, 15136, 10279, 2478, + -6931, -16094, -23020, -26028, -24147, -17379, -6760, 5805, + 17908, 27120, 31509, 30054, 22885, 11282, -2568, -16010, + -26457, -31915, -31388, -25068, -14285, -1213, 11585, 21691, + 27309, 27611, 22858, 14296, 3845, -6338, -14322, -18787, + -19260, -16141, -10543, -3975, 2035, 6301, 8215, 7844, + 5839, 3203, 983, -30, 467, 2220, 4489, 6269, + 6592, 4827, 908, -4585, -10519, -15440, -17934, -16985, + -12277, -4339, 5493, 15322, 23069, 26935, 25812, 19575, + 9162, -3569, -16198, -26222, -31585, -31109, -24766, -13697, + +}; diff --git a/channels/ringtone.h b/channels/ringtone.h new file mode 100644 index 0000000000..559c42a7be --- /dev/null +++ b/channels/ringtone.h @@ -0,0 +1,30 @@ +/* ringtone.h: Generated from frequencies 440 and 480 + by gentone. 200 samples */ +static short ringtone[200] = { + 0, 11581, 21659, 28927, 32445, 31764, 26981, 18727, + 8084, -3559, -14693, -23875, -29927, -32083, -30088, -24228, + -15290, -4453, 6864, 17195, 25212, 29902, 30693, 27526, + 20856, 11585, 944, -9673, -18899, -25560, -28837, -28357, + -24244, -17089, -7868, 2192, 11780, 19667, 24872, 26779, + 25212, 20450, 13179, 4396, -4731, -13019, -19421, -23164, + -23839, -21446, -16384, -9384, -1408, 6484, 13281, 18145, + 20517, 20182, 17286, 12301, 5951, -887, -7314, -12519, + -15886, -17068, -16017, -12983, -8458, -3109, 2327, 7142, + 10750, 12757, 13007, 11585, 8793, 5095, 1044, -2800, + -5951, -8053, -8921, -8560, -7141, -4967, -2421, 104, + 2260, 3791, 4567, 4589, 3977, 2941, 1733, 600, + -257, -722, -772, -481, 0, 481, 772, 722, + 257, -600, -1733, -2941, -3977, -4589, -4567, -3791, + -2260, -104, 2421, 4967, 7141, 8560, 8921, 8053, + 5951, 2800, -1044, -5095, -8793, -11585, -13007, -12757, + -10750, -7142, -2327, 3109, 8458, 12983, 16017, 17068, + 15886, 12519, 7314, 887, -5951, -12301, -17286, -20182, + -20517, -18145, -13281, -6484, 1408, 9384, 16384, 21446, + 23839, 23164, 19421, 13019, 4731, -4396, -13179, -20450, + -25212, -26779, -24872, -19667, -11780, -2192, 7868, 17089, + 24244, 28357, 28837, 25560, 18899, 9673, -944, -11585, + -20856, -27526, -30693, -29902, -25212, -17195, -6864, 4453, + 15290, 24228, 30088, 32083, 29927, 23875, 14693, 3559, + -8084, -18727, -26981, -31764, -32445, -28927, -21659, -11581, + +}; diff --git a/utils/Makefile b/utils/Makefile index a2d3c3dc5f..b52bba7afc 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -56,7 +56,7 @@ uninstall: clean: rm -f *.o $(ALL_UTILS) check_expr *.s *.i - rm -f .*.o.d .*.oo.d + rm -f .*.d rm -f md5.c strcompat.c ast_expr2.c ast_expr2f.c pbx_ael.c rm -f aelparse.c aelbison.c