shithub: opus

Download patch

ref: 8ee899b62a4a11a49060a810e39dd75a874ccaaf
parent: 2f2f9d63b84d0eacdf66c03b683b932b367b017e
author: Ron <[email protected]>
date: Fri May 10 22:13:47 EDT 2013

More Makefile.unix tweaks

Drop some unneeded CINCLUDES.
Drop the VPATH stuff altogether.  It's entirely unused here, and some of
the paths in it don't even exist and apparently never have in this tree.
Drop the 'default' rule, without it there, 'all' already is the default.
Drop $(TARGET) from all, it already includes 'lib' which is $(TARGET).
Declare phony targets PHONY.

--- a/Makefile.unix
+++ b/Makefile.unix
@@ -46,30 +46,20 @@
 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
 
 LDLIBDIRS = ./
@@ -109,10 +99,8 @@
 OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C))
 
 # Rules
-default: all
+all: lib opus_demo opus_compare
 
-all: $(TARGET) lib opus_demo opus_compare
-
 lib: $(TARGET)
 
 $(TARGET): $(OBJS)
@@ -134,3 +122,5 @@
 
 clean:
 	rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) $(OBJS) $(OPUSDEMO_OBJS)
+
+.PHONY: all lib clean