OLD | NEW |
1 #################### COMPILE OPTIONS ####################### | 1 #################### COMPILE OPTIONS ####################### |
2 | 2 |
3 # Uncomment this for fixed-point build | 3 # Uncomment this for fixed-point build |
4 #FIXED_POINT=1 | 4 #FIXED_POINT=1 |
5 | 5 |
6 # It is strongly recommended to uncomment one of these | 6 # It is strongly recommended to uncomment one of these |
7 # VAR_ARRAYS: Use C99 variable-length arrays for stack allocation | 7 # VAR_ARRAYS: Use C99 variable-length arrays for stack allocation |
8 # USE_ALLOCA: Use alloca() for stack allocation | 8 # USE_ALLOCA: Use alloca() for stack allocation |
9 # If none is defined, then the fallback is a non-threadsafe global array | 9 # If none is defined, then the fallback is a non-threadsafe global array |
10 CFLAGS := -DUSE_ALLOCA $(CFLAGS) | 10 CFLAGS := -DUSE_ALLOCA $(CFLAGS) |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 LIB_NAME = opus | 84 LIB_NAME = opus |
85 TARGET = $(LIBPREFIX)$(LIB_NAME)$(LIBSUFFIX) | 85 TARGET = $(LIBPREFIX)$(LIB_NAME)$(LIBSUFFIX) |
86 | 86 |
87 SRCS_C = $(SILK_SOURCES) $(CELT_SOURCES) $(OPUS_SOURCES) | 87 SRCS_C = $(SILK_SOURCES) $(CELT_SOURCES) $(OPUS_SOURCES) |
88 | 88 |
89 OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SRCS_C)) | 89 OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SRCS_C)) |
90 | 90 |
91 OPUSDEMO_SRCS_C = src/opus_demo.c | 91 OPUSDEMO_SRCS_C = src/opus_demo.c |
92 OPUSDEMO_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSDEMO_SRCS_C)) | 92 OPUSDEMO_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSDEMO_SRCS_C)) |
93 | 93 |
| 94 TESTOPUSAPI_SRCS_C = tests/test_opus_api.c |
| 95 TESTOPUSAPI_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSAPI_SRCS_C)) |
| 96 |
| 97 TESTOPUSDECODE_SRCS_C = tests/test_opus_decode.c |
| 98 TESTOPUSDECODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSDECODE_SRCS_C)) |
| 99 |
| 100 TESTOPUSENCODE_SRCS_C = tests/test_opus_encode.c |
| 101 TESTOPUSENCODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSENCODE_SRCS_C)) |
| 102 |
| 103 TESTOPUSPADDING_SRCS_C = tests/test_opus_padding.c |
| 104 TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C)) |
| 105 |
94 OPUSCOMPARE_SRCS_C = src/opus_compare.c | 106 OPUSCOMPARE_SRCS_C = src/opus_compare.c |
95 OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C)) | 107 OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C)) |
96 | 108 |
97 # Rules | 109 # Rules |
98 all: lib opus_demo opus_compare | 110 all: lib opus_demo opus_compare test_opus_api test_opus_decode test_opus_encode
test_opus_padding |
99 | 111 |
100 lib: $(TARGET) | 112 lib: $(TARGET) |
101 | 113 |
102 $(TARGET): $(OBJS) | 114 $(TARGET): $(OBJS) |
103 $(ARCHIVE.cmdline) | 115 $(ARCHIVE.cmdline) |
104 | 116 |
105 opus_demo$(EXESUFFIX): $(OPUSDEMO_OBJS) $(TARGET) | 117 opus_demo$(EXESUFFIX): $(OPUSDEMO_OBJS) $(TARGET) |
106 $(LINK.o.cmdline) | 118 $(LINK.o.cmdline) |
107 | 119 |
| 120 test_opus_api$(EXESUFFIX): $(TESTOPUSAPI_OBJS) $(TARGET) |
| 121 $(LINK.o.cmdline) |
| 122 |
| 123 test_opus_decode$(EXESUFFIX): $(TESTOPUSDECODE_OBJS) $(TARGET) |
| 124 $(LINK.o.cmdline) |
| 125 |
| 126 test_opus_encode$(EXESUFFIX): $(TESTOPUSENCODE_OBJS) $(TARGET) |
| 127 $(LINK.o.cmdline) |
| 128 |
| 129 test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET) |
| 130 $(LINK.o.cmdline) |
| 131 |
108 opus_compare$(EXESUFFIX): $(OPUSCOMPARE_OBJS) | 132 opus_compare$(EXESUFFIX): $(OPUSCOMPARE_OBJS) |
109 $(LINK.o.cmdline) | 133 $(LINK.o.cmdline) |
110 | 134 |
111 celt/celt.o: CFLAGS += -DPACKAGE_VERSION='$(PACKAGE_VERSION)' | 135 celt/celt.o: CFLAGS += -DPACKAGE_VERSION='$(PACKAGE_VERSION)' |
112 celt/celt.o: package_version | 136 celt/celt.o: package_version |
113 | 137 |
114 package_version: force | 138 package_version: force |
115 @if [ -x ./update_version ]; then \ | 139 @if [ -x ./update_version ]; then \ |
116 ./update_version || true; \ | 140 ./update_version || true; \ |
117 elif [ ! -e ./package_version ]; then \ | 141 elif [ ! -e ./package_version ]; then \ |
118 echo 'PACKAGE_VERSION="unknown"' > ./package_version; \ | 142 echo 'PACKAGE_VERSION="unknown"' > ./package_version; \ |
119 fi | 143 fi |
120 | 144 |
121 force: | 145 force: |
122 | 146 |
123 clean: | 147 clean: |
124 rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \ | 148 rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \ |
125 » » $(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) | 149 test_opus_api$(EXESUFFIX) test_opus_decode$(EXESUFFIX) \ |
| 150 test_opus_encode$(EXESUFFIX) test_opus_padding$(EXESUFFIX) \ |
| 151 » » $(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS)
\ |
| 152 $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_
OBJS) |
126 | 153 |
127 .PHONY: all lib clean | 154 .PHONY: all lib clean |
OLD | NEW |