RetroArch/audio/test/Makefile

109 lines
3.2 KiB
Makefile
Raw Normal View History

TESTS := test-sinc-lowest \
test-snr-sinc-lowest \
test-sinc-lower \
test-snr-sinc-lower \
test-sinc \
test-snr-sinc \
test-sinc-higher \
test-snr-sinc-higher \
test-sinc-highest \
2014-03-23 13:27:31 +00:00
test-snr-sinc-highest \
test-cc \
test-snr-cc
2012-02-25 00:47:23 +00:00
2015-09-13 02:08:18 +00:00
LIBRETRO_COMM_DIR = ../../libretro-common
2014-09-17 18:07:40 +00:00
CFLAGS += -O3 -ffast-math -g -Wall -pedantic -march=native -std=gnu99
2015-09-13 02:08:18 +00:00
CFLAGS += -DRESAMPLER_TEST -DRARCH_DUMMY_LOG -DRARCH_INTERNAL
CFLAGS += -I$(LIBRETRO_COMM_DIR)/include -I../../
2014-09-17 18:07:40 +00:00
2012-02-25 00:47:23 +00:00
LDFLAGS += -lm
2015-09-13 02:08:18 +00:00
SHAREDOBJ += $(LIBRETRO_COMM_DIR)/memmap/memalign.o \
2016-03-23 17:45:44 +00:00
$(LIBRETRO_COMM_DIR)/lists/string_list.o \
../..//config_file_userdata.o \
2016-03-23 17:54:17 +00:00
../audio_resampler_driver.o \
2015-09-13 02:08:18 +00:00
$(LIBRETRO_COMM_DIR)/file/config_file.o \
2016-03-23 17:45:44 +00:00
$(LIBRETRO_COMM_DIR)/streams/file_stream.o \
2016-03-23 17:54:17 +00:00
$(LIBRETRO_COMM_DIR)/string/stdstring.o \
2015-09-13 02:08:18 +00:00
$(LIBRETRO_COMM_DIR)/file/file_path.o \
2016-03-23 17:54:17 +00:00
$(LIBRETRO_COMM_DIR)/file/retro_stat.o \
$(LIBRETRO_COMM_DIR)/compat/compat_strl.o \
2015-09-13 02:08:18 +00:00
$(LIBRETRO_COMM_DIR)/hash/rhash.o \
2012-02-25 00:47:23 +00:00
all: $(TESTS)
2014-09-17 18:07:40 +00:00
main-cc.o: main.c
2014-09-24 07:39:41 +00:00
$(CC) -c -o $@ $< $(CFLAGS) -DRESAMPLER_IDENT='"CC"'
2014-09-17 18:07:40 +00:00
snr-cc.o: snr.c
2014-09-24 07:39:41 +00:00
$(CC) -c -o $@ $< $(CFLAGS) -DRESAMPLER_IDENT='"CC"'
2014-03-23 13:27:31 +00:00
2015-09-13 02:08:18 +00:00
cc-resampler.o: ../drivers_resampler/cc_resampler.c
2014-03-23 13:27:31 +00:00
$(CC) -c -o $@ $< $(CFLAGS)
2016-03-23 17:54:17 +00:00
sinc-lowest.o: ../drivers_resampler/sinc_resampler.c
$(CC) -c -o $@ $< $(CFLAGS) -DSINC_LOWEST_QUALITY
2016-03-23 17:54:17 +00:00
sinc-lower.o: ../drivers_resampler/sinc_resampler.c
$(CC) -c -o $@ $< $(CFLAGS) -DSINC_LOWER_QUALITY
2016-03-23 17:54:17 +00:00
sinc.o: ../drivers_resampler/sinc_resampler.c
2014-09-17 18:07:40 +00:00
$(CC) -c -o $@ $< $(CFLAGS)
2016-03-23 17:54:17 +00:00
nearest_resampler.o: ../drivers_resampler/nearest_resampler.c
$(CC) -c -o $@ $< $(CFLAGS)
2015-02-11 01:40:18 +00:00
sinc-higher.o: ../drivers_resampler/sinc.c
$(CC) -c -o $@ $< $(CFLAGS) -DSINC_HIGHER_QUALITY
2015-02-11 01:40:18 +00:00
sinc-highest.o: ../drivers_resampler/sinc.c
$(CC) -c -o $@ $< $(CFLAGS) -DSINC_HIGHEST_QUALITY
2016-03-23 17:54:17 +00:00
test-sinc-lowest: sinc-lowest.o ../audio_utils.o main.o nearest_resampler.o $(SHAREDOBJ)
$(CC) -o $@ $^ $(LDFLAGS)
2016-03-23 17:54:17 +00:00
test-snr-sinc-lowest: sinc-lowest.o ../audio_utils.o snr.o nearest_resampler.o $(SHAREDOBJ)
$(CC) -o $@ $^ $(LDFLAGS)
2016-03-23 17:54:17 +00:00
test-sinc-lower: sinc-lower.o ../audio_utils.o main.o nearest_resampler.o $(SHAREDOBJ)
$(CC) -o $@ $^ $(LDFLAGS)
2016-03-23 17:54:17 +00:00
test-snr-sinc-lower: sinc-lower.o ../audio_utils.o snr.o nearest_resampler.o $(SHAREDOBJ)
$(CC) -o $@ $^ $(LDFLAGS)
2016-03-23 17:54:17 +00:00
test-sinc: sinc.o ../audio_utils.o main.o nearest_resampler.o $(SHAREDOBJ)
$(CC) -o $@ $^ $(LDFLAGS)
2016-03-23 17:54:17 +00:00
test-snr-sinc: sinc.o ../audio_utils.o snr.o nearest_resampler.o $(SHAREDOBJ)
$(CC) -o $@ $^ $(LDFLAGS)
2016-03-23 17:54:17 +00:00
test-sinc-higher: sinc-higher.o ../audio_utils.o main.o nearest_resampler.o $(SHAREDOBJ)
$(CC) -o $@ $^ $(LDFLAGS)
2016-03-23 17:54:17 +00:00
test-snr-sinc-higher: sinc-higher.o ../audio_utils.o snr.o nearest_resampler.o $(SHAREDOBJ)
$(CC) -o $@ $^ $(LDFLAGS)
2016-03-23 17:54:17 +00:00
test-sinc-highest: sinc-highest.o ../audio_utils.o main.o nearest_resampler.o $(SHAREDOBJ)
$(CC) -o $@ $^ $(LDFLAGS)
2016-03-23 17:54:17 +00:00
test-snr-sinc-highest: sinc-highest.o ../audio_utils.o snr.o nearest_resampler.o $(SHAREDOBJ)
$(CC) -o $@ $^ $(LDFLAGS)
2016-03-23 17:54:17 +00:00
test-cc: cc-resampler.o ../audio_utils.o main-cc.o resampler-cc.o sinc.o nearest_resampler.o $(SHAREDOBJ)
2014-03-23 13:27:31 +00:00
$(CC) -o $@ $^ $(LDFLAGS)
2016-03-23 17:54:17 +00:00
test-snr-cc: cc-resampler.o ../audio_utils.o snr-cc.o resampler-cc.o sinc.o nearest_resampler.o $(SHAREDOBJ)
2014-03-23 13:27:31 +00:00
$(CC) -o $@ $^ $(LDFLAGS)
2012-02-25 00:47:23 +00:00
%.o: %.c
$(CC) -c -o $@ $< $(CFLAGS)
clean:
rm -f $(TESTS)
rm -f *.o
rm -f ../*.o
.PHONY: clean