shithub: sox

Download patch

ref: 99df22f4d8ac252140cad65adf2ce76e03d6a043
parent: 77790daaec6a86c5c7f66648281ff84f264b4ab1
author: robs <robs>
date: Wed Dec 26 11:12:42 EST 2007

support out-of-source-build

--- a/lpc10/CMakeLists.txt
+++ b/lpc10/CMakeLists.txt
@@ -1,1 +1,9 @@
-add_library(lpc10 analys bsynz chanwr dcbias decode deemp difmag dyptrk encode energy f2clib ham84 hp100 invert irc2pc ivfilt lpcdec lpcenc lpcini lpfilt median mload onset pitsyn placea placev preemp prepro random rcchk synths tbdm voicin vparms)
+add_custom_command(
+  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/soxstdint.h
+  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../src/soxstdint.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/soxstdint.h
+  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../src/soxstdint.h.cmake
+)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+add_library(lpc10 analys bsynz chanwr dcbias decode deemp difmag dyptrk encode energy f2clib ham84 hp100 invert irc2pc ivfilt lpcdec lpcenc lpcini lpfilt median mload onset pitsyn placea placev preemp prepro random rcchk synths tbdm voicin vparms soxstdint)
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../src)
--- a/lpc10/Makefile.am
+++ b/lpc10/Makefile.am
@@ -5,4 +5,5 @@
   ham84.c hp100.c invert.c irc2pc.c ivfilt.c lpcdec.c lpcenc.c lpcini.c \
   lpfilt.c median.c mload.c onset.c pitsyn.c placea.c placev.c preemp.c \
   prepro.c random.c rcchk.c synths.c tbdm.c voicin.c vparms.c
+AM_CPPFLAGS=-I../src
 EXTRA_DIST = CMakeLists.txt
--- a/lpc10/lpc10.h
+++ b/lpc10/lpc10.h
@@ -1,6 +1,9 @@
 /*
 
 $Log: lpc10.h,v $
+Revision 1.2  2007/12/26 16:12:42  robs
+support out-of-source-build
+
 Revision 1.1  2007/04/16 21:57:22  rrt
 LPC-10 support, documentation still to come; I wanted to land the code
 before 14.0.0 went into test, and I'll be busy tomorrow.
@@ -17,7 +20,7 @@
 #ifndef __LPC10_H__
 #define __LPC10_H__
 
-#include "../src/soxstdint.h"
+#include "soxstdint.h"
 
 #define LPC10_SAMPLES_PER_FRAME 180
 #define LPC10_BITS_IN_COMPRESSED_FRAME 54
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,7 +1,6 @@
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}config.h)
 
-#include_directories(${liblpc10_BINARY_DIR}/lpc10)
-#link_directories(${liblpc10_SOURCE_DIR}/lpc10)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
 if(CMAKE_COMPILER_IS_GNUCC)
 #  add_definitions(-Wconversion)
@@ -12,10 +11,10 @@
 endif (NOT EXTERNAL_GSM)
 
 add_custom_command(
-  OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/soxstdint.h
-  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/soxstdint.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/soxstdint.h
+  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/soxstdint.h
+  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/soxstdint.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/soxstdint.h
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/soxstdint.h.cmake
-  )
+)
 
 # Format with: !xargs echo|tr ' ' '\n'|sort|column|expand|sed 's/^/  /'
 set(effects_srcs
@@ -40,7 +39,7 @@
   au              g723_24         nulfile         sndrtool        wav
   auto            g723_40         prc             sphere          wve
   avr             g72x            raw             tx16w           xa
-  cdr             gsm             raw-fmt         u1-fmt
+  cdr             gsm.c           raw-fmt         u1-fmt
 )
 add_library(lib${PROJECT_NAME}
   ${effects_srcs}         misc                    util
@@ -48,7 +47,6 @@
   getopt                  soxio
   getopt1                 soxstdint
 )
-set(optional_libs /usr/local/lib/libsndfile.so ${optional_libs})
 add_executable(${PROJECT_NAME} ${PROJECT_NAME}.c)
 target_link_libraries(${PROJECT_NAME} lib${PROJECT_NAME} lpc10 ${optional_libs})
 add_executable(sox_sample_test sox_sample_test.c)
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -12,8 +12,8 @@
 # SoX - the application #
 #########################
 
-bin_PROGRAMS = sox sox_sample_test
-EXTRA_PROGRAMS = example1
+bin_PROGRAMS = sox
+EXTRA_PROGRAMS = example1 sox_sample_test
 lib_LTLIBRARIES = libsox.la libsfx.la
 include_HEADERS = sox.h soxstdint.h
 sox_SOURCES = sox.c