| Index: Makefile.mips
|
| diff --git a/Makefile.unix b/Makefile.mips
|
| similarity index 68%
|
| copy from Makefile.unix
|
| copy to Makefile.mips
|
| index 36fd337216aefba3610922459869d3546c071036..464ca6bd237f78931e4ad6eaf1676ad2d41b0735 100644
|
| --- a/Makefile.unix
|
| +++ b/Makefile.mips
|
| @@ -1,7 +1,7 @@
|
| #################### COMPILE OPTIONS #######################
|
|
|
| # Uncomment this for fixed-point build
|
| -#FIXED_POINT=1
|
| +FIXED_POINT=1
|
|
|
| # It is strongly recommended to uncomment one of these
|
| # VAR_ARRAYS: Use C99 variable-length arrays for stack allocation
|
| @@ -45,7 +45,9 @@ ldflags-from-ldlibdirs = $(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
|
| +
|
| +CFLAGS += -mips32r2 -mno-mips16 -std=gnu99 -O2 -g $(WARNINGS) -DENABLE_ASSERTIONS -DMIPSr1_ASM -DOPUS_BUILD -mdspr2 -march=74kc -mtune=74kc -mmt -mgp32
|
| +
|
| CINCLUDES = include silk celt
|
|
|
| ifdef FIXED_POINT
|
| @@ -91,11 +93,23 @@ OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SRCS_C))
|
| OPUSDEMO_SRCS_C = src/opus_demo.c
|
| OPUSDEMO_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSDEMO_SRCS_C))
|
|
|
| +TESTOPUSAPI_SRCS_C = tests/test_opus_api.c
|
| +TESTOPUSAPI_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSAPI_SRCS_C))
|
| +
|
| +TESTOPUSDECODE_SRCS_C = tests/test_opus_decode.c
|
| +TESTOPUSDECODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSDECODE_SRCS_C))
|
| +
|
| +TESTOPUSENCODE_SRCS_C = tests/test_opus_encode.c
|
| +TESTOPUSENCODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSENCODE_SRCS_C))
|
| +
|
| +TESTOPUSPADDING_SRCS_C = tests/test_opus_padding.c
|
| +TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C))
|
| +
|
| OPUSCOMPARE_SRCS_C = src/opus_compare.c
|
| OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C))
|
|
|
| # Rules
|
| -all: lib opus_demo opus_compare
|
| +all: lib opus_demo opus_compare test_opus_api test_opus_decode test_opus_encode test_opus_padding
|
|
|
| lib: $(TARGET)
|
|
|
| @@ -105,6 +119,18 @@ $(TARGET): $(OBJS)
|
| opus_demo$(EXESUFFIX): $(OPUSDEMO_OBJS) $(TARGET)
|
| $(LINK.o.cmdline)
|
|
|
| +test_opus_api$(EXESUFFIX): $(TESTOPUSAPI_OBJS) $(TARGET)
|
| + $(LINK.o.cmdline)
|
| +
|
| +test_opus_decode$(EXESUFFIX): $(TESTOPUSDECODE_OBJS) $(TARGET)
|
| + $(LINK.o.cmdline)
|
| +
|
| +test_opus_encode$(EXESUFFIX): $(TESTOPUSENCODE_OBJS) $(TARGET)
|
| + $(LINK.o.cmdline)
|
| +
|
| +test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET)
|
| + $(LINK.o.cmdline)
|
| +
|
| opus_compare$(EXESUFFIX): $(OPUSCOMPARE_OBJS)
|
| $(LINK.o.cmdline)
|
|
|
| @@ -122,6 +148,9 @@ force:
|
|
|
| clean:
|
| rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \
|
| - $(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS)
|
| + test_opus_api$(EXESUFFIX) test_opus_decode$(EXESUFFIX) \
|
| + test_opus_encode$(EXESUFFIX) test_opus_padding$(EXESUFFIX) \
|
| + $(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \
|
| + $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS)
|
|
|
| .PHONY: all lib clean
|
|
|