Fixes a denorm problem when the input goes silent after active audio
[opus.git] / Makefile.unix
index 619dea7..c0bab7c 100644 (file)
@@ -46,29 +46,19 @@ CP     = $(TOOLCHAIN_PREFIX)cp
 cppflags-from-defines   = $(addprefix -D,$(1))
 cppflags-from-includes  = $(addprefix -I,$(1))
 ldflags-from-ldlibdirs  = $(addprefix -L,$(1))
-ldlibs-from-libs                = $(addprefix -l,$(1))
+ldlibs-from-libs        = $(addprefix -l,$(1))
 
 WARNINGS = -Wall -W -Wstrict-prototypes -Wextra -Wcast-align -Wnested-externs -Wshadow
 CFLAGS  += -O2 -g $(WARNINGS) -DOPUS_BUILD
+CINCLUDES = include silk celt
+
 ifdef FIXED_POINT
 CFLAGS += -DFIXED_POINT=1 -DDISABLE_FLOAT_API
+CINCLUDES += silk/fixed
+else
+CINCLUDES += silk/float
 endif
 
-CINCLUDES += include/ \
-       silk/ \
-       silk/float/ \
-       silk/fixed/ \
-       celt/ \
-       src/
-
-# VPATH e.g. VPATH = src:../headers
-VPATH = ./ \
-       silk/interface \
-       silk/src_FIX \
-       silk/src_FLP \
-       silk/src_SigProc_FIX \
-       silk/src_SigProc_FLP \
-       test
 
 LIBS = m
 
@@ -109,9 +99,7 @@ OPUSCOMPARE_SRCS_C = src/opus_compare.c
 OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C))
 
 # Rules
-default: all
-
-all: $(TARGET) lib opus_demo opus_compare
+all: lib opus_demo opus_compare
 
 lib: $(TARGET)
 
@@ -128,9 +116,16 @@ celt/celt.o: CFLAGS += -DPACKAGE_VERSION='$(PACKAGE_VERSION)'
 celt/celt.o: package_version
 
 package_version: force
-       @./update_version || true
+       @if [ -x ./update_version ]; then \
+               ./update_version || true; \
+       elif [ ! -e ./package_version ]; then \
+               echo 'PACKAGE_VERSION="unknown"' > ./package_version; \
+       fi
 
 force:
 
 clean:
-       rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) $(OBJS) $(OPUSDEMO_OBJS)
+       rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \
+               $(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS)
+
+.PHONY: all lib clean