MT#55283 eliminate duplicate compilation of .S

Change-Id: I93f1f3ff228e0310cf8e47fbb71a4a605e1e12b1
mr26.1
Richard Fuchs 1 month ago
parent 4cf920c19d
commit d9b72e0134

@ -88,7 +88,7 @@ LIBSRCS= loglib.c auxlib.c rtplib.c str.c socket.c streambuf.c ssllib.c dtmflib.
bufferpool.c bencode.c netfilter_api.c
ifeq ($(with_transcoding),yes)
LIBSRCS+= codeclib.strhash.c resample.c
LIBASM= mvr2s_x64_avx2.S mvr2s_x64_avx512.S mix_in_x64_avx2.S mix_in_x64_avx512bw.S mix_in_x64_sse2.S
LIBASM := mvr2s_x64_avx2.S mvr2s_x64_avx512.S mix_in_x64_avx2.S mix_in_x64_avx512bw.S mix_in_x64_sse2.S
endif
ifneq ($(have_liburing),yes)
LIBSRCS+= uring.c

@ -11,14 +11,14 @@ ifeq ($(with_transcoding),yes)
CFLAGS += $(CFLAGS_OPUS)
endif
SRCS = auxlib.c bencode.c bufferpool.c codeclib.strhash.c dtmflib.c
SRCS := auxlib.c bencode.c bufferpool.c codeclib.strhash.c dtmflib.c
SRCS += http.c loglib.c mix_buffer.c
SRCS += netfilter_api.c oauth.c poller.c resample.c
SRCS += rtplib.c s3utils.c socket.c
SRCS += ssllib.c str.c streambuf.c uring.c
ASM = mix_in_x64_avx2.S mix_in_x64_avx512bw.S mix_in_x64_sse2.S mvr2s_x64_avx2.S mvr2s_x64_avx512.S
ASM := mix_in_x64_avx2.S mix_in_x64_avx512bw.S mix_in_x64_sse2.S mvr2s_x64_avx2.S mvr2s_x64_avx512.S
include common.Makefile
all: $(OBJS)
all: $(ALLOBJS)

@ -5,17 +5,17 @@ include ../lib/lib.Makefile
all: $(TARGET) $(MANS)
OBJS = $(SRCS:.c=.o)
OBJS := $(SRCS:.c=.o)
ASMOBJS = $(ASM:.S=.o)
ASM := $(ASM) $(patsubst %,$(top_srcdir)/lib/%,$(LIBASM))
ASMOBJS := $(ASM:.S=.o)
LIBOBJS = $(LIBSRCS:.c=.o)
DAEMONOBJS = $(DAEMONSRCS:.c=.o)
LIBASMOBJS = $(LIBASM:.S=.o)
ALLOBJS = $(OBJS) $(LIBOBJS) $(LIBASMOBJS) $(DAEMONOBJS) $(ASMOBJS)
ALLOBJS := $(OBJS) $(LIBOBJS) $(DAEMONOBJS) $(ASMOBJS)
$(OBJS): %.o: %.c
@ -27,9 +27,6 @@ $(LIBOBJS): %.o: ../lib/%.c
$(DAEMONOBJS): %.o: ../daemon/%.c
$(CC) -c $(CFLAGS) $< -o $@
$(LIBASMOBJS): %.o: ../lib/%.S
$(CC) -c $(ASFLAGS) $< -o $@
$(TARGET): $(ALLOBJS) Makefile
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(ALLOBJS) $(LDLIBS)
@ -42,7 +39,7 @@ debug:
BUILD_TEST_ALTS = ../lib/fix_frame_channel_layout.h ../lib/dtmf_rx_fillin.h ../lib/spandsp_logging.h
clean:
rm -f $(ALLOBJS) $(TARGET) $(LIBSRCS) $(LIBASM) $(DAEMONSRCS) $(MANS) $(ADD_CLEAN) core core.*
rm -f $(ALLOBJS) $(TARGET) $(LIBSRCS) $(DAEMONSRCS) $(MANS) $(ADD_CLEAN) core core.*
rm -f $(BUILD_TEST_ALTS) $(BUILD_TEST_ALTS:.h=-test) *.strhash.c
install:

@ -47,7 +47,7 @@ LDLIBS += $(LDLIBS_CODEC_CHAIN)
SRCS = main.c log.c
LIBSRCS = codeclib.strhash.c loglib.c auxlib.c resample.c str.c dtmflib.c rtplib.c poller.c ssllib.c bufferpool.c \
bencode.c uring.c
LIBASM = mvr2s_x64_avx2.S mvr2s_x64_avx512.S
LIBASM := mvr2s_x64_avx2.S mvr2s_x64_avx512.S
include ../lib/common.Makefile

@ -46,7 +46,7 @@ SRCS= epoll.c garbage.c inotify.c main.c metafile.c stream.c recaux.c packet.c
gcs.c
LIBSRCS= loglib.c auxlib.c rtplib.c codeclib.strhash.c resample.c str.c socket.c streambuf.c ssllib.c \
dtmflib.c bufferpool.c bencode.c http.c s3utils.c oauth.c
LIBASM= mvr2s_x64_avx2.S mvr2s_x64_avx512.S mix_in_x64_avx2.S mix_in_x64_avx512bw.S mix_in_x64_sse2.S
LIBASM := mvr2s_x64_avx2.S mvr2s_x64_avx512.S mix_in_x64_avx2.S mix_in_x64_avx512bw.S mix_in_x64_sse2.S
MDS= rtpengine-recording.ronn
MANS= $(MDS:.ronn=.8)

@ -81,7 +81,7 @@ DAEMONSRCS+= control_ng_flags_parser.c codec.c call.c ice.c kernel.c media_socke
media_player.c jitter_buffer.c t38.c tcp_listener.c mqtt.c websocket.c \
audio_player.c arena.c ng_client.c call_interfaces.c sdp.strhash.c \
janus.strhash.c control_ng.strhash.c call_flags.strhash.c
LIBASM= mvr2s_x64_avx2.S mvr2s_x64_avx512.S mix_in_x64_avx2.S mix_in_x64_avx512bw.S mix_in_x64_sse2.S
LIBASM := mvr2s_x64_avx2.S mvr2s_x64_avx512.S mix_in_x64_avx2.S mix_in_x64_avx512bw.S mix_in_x64_sse2.S
endif
ifneq ($(have_liburing),yes)
LIBSRCS+= uring.c
@ -301,8 +301,13 @@ daemon-tests-recording: daemon-test-deps
test-bitstr: test-bitstr.o
test-mix-buffer: test-mix-buffer.o $(COMMONOBJS) mix_buffer.o ssrc.o rtp.o crypto.o helpers.o \
mix_in_x64_avx2.o mix_in_x64_sse2.o mix_in_x64_avx512bw.o codeclib.strhash.o dtmflib.o \
mvr2s_x64_avx2.o mvr2s_x64_avx512.o resample.o bufferpool.o uring.o poller.o bencode.o log.o
../lib/mix_in_x64_avx2.o \
../lib/mix_in_x64_sse2.o \
../lib/mix_in_x64_avx512bw.o \
codeclib.strhash.o dtmflib.o \
../lib/mvr2s_x64_avx2.o \
../lib/mvr2s_x64_avx512.o \
resample.o bufferpool.o uring.o poller.o bencode.o log.o
spandsp_send_fax_pcm: spandsp_send_fax_pcm.o
@ -315,10 +320,14 @@ spandsp_recv_fax_t38: spandsp_recv_fax_t38.o
spandsp_raw_fax_tests: spandsp_send_fax_pcm spandsp_recv_fax_pcm spandsp_send_fax_t38 spandsp_recv_fax_t38
test-amr-decode: test-amr-decode.o $(COMMONOBJS) codeclib.strhash.o resample.o dtmflib.o resample.o \
mvr2s_x64_avx2.o mvr2s_x64_avx512.o bencode.o log.o
../lib/mvr2s_x64_avx2.o \
../lib/mvr2s_x64_avx512.o \
bencode.o log.o
test-amr-encode: test-amr-encode.o $(COMMONOBJS) codeclib.strhash.o resample.o dtmflib.o \
mvr2s_x64_avx2.o mvr2s_x64_avx512.o bencode.o log.o
../lib/mvr2s_x64_avx2.o \
../lib/mvr2s_x64_avx512.o \
bencode.o log.o
test-dtmf-detect: test-dtmf-detect.o
@ -334,8 +343,14 @@ test-stats: test-stats.o $(COMMONOBJS) codeclib.strhash.o resample.o codec.o ssr
control_ng_flags_parser.o control_ng.strhash.o graphite.o \
streambuf.o cookie_cache.o udp_listener.o homer.o load.o cdr.o dtmf.o timerthread.o \
media_player.o jitter_buffer.o dtmflib.o t38.o tcp_listener.o mqtt.o janus.strhash.o \
websocket.o cli.strhash.o mvr2s_x64_avx2.o mvr2s_x64_avx512.o audio_player.o mix_buffer.o \
mix_in_x64_avx2.o mix_in_x64_sse2.o mix_in_x64_avx512bw.o bufferpool.o uring.o arena.o ng_client.o \
websocket.o cli.strhash.o \
../lib/mvr2s_x64_avx2.o \
../lib/mvr2s_x64_avx512.o \
audio_player.o mix_buffer.o \
../lib/mix_in_x64_avx2.o \
../lib/mix_in_x64_sse2.o \
../lib/mix_in_x64_avx512bw.o \
bufferpool.o uring.o arena.o ng_client.o \
call_flags.strhash.o log.o
test-transcode: test-transcode.o $(COMMONOBJS) codeclib.strhash.o resample.o codec.o ssrc.o call.o ice.o helpers.o \
@ -344,15 +359,26 @@ test-transcode: test-transcode.o $(COMMONOBJS) codeclib.strhash.o resample.o cod
control_ng_flags_parser.o control_ng.strhash.o \
streambuf.o cookie_cache.o udp_listener.o homer.o load.o cdr.o dtmf.o timerthread.o \
media_player.o jitter_buffer.o dtmflib.o t38.o tcp_listener.o mqtt.o janus.strhash.o websocket.o \
cli.strhash.o mvr2s_x64_avx2.o mvr2s_x64_avx512.o audio_player.o mix_buffer.o \
mix_in_x64_avx2.o mix_in_x64_sse2.o mix_in_x64_avx512bw.o bufferpool.o uring.o arena.o ng_client.o \
cli.strhash.o \
../lib/mvr2s_x64_avx2.o \
../lib/mvr2s_x64_avx512.o \
audio_player.o mix_buffer.o \
../lib/mix_in_x64_avx2.o \
../lib/mix_in_x64_sse2.o \
../lib/mix_in_x64_avx512bw.o \
bufferpool.o uring.o arena.o ng_client.o \
call_flags.strhash.o log.o
test-resample: test-resample.o $(COMMONOBJS) codeclib.strhash.o resample.o dtmflib.o mvr2s_x64_avx2.o \
mvr2s_x64_avx512.o bencode.o log.o
test-resample: test-resample.o $(COMMONOBJS) codeclib.strhash.o resample.o dtmflib.o \
../lib/mvr2s_x64_avx2.o \
../lib/mvr2s_x64_avx512.o \
bencode.o log.o
test-payload-tracker: test-payload-tracker.o $(COMMONOBJS) ssrc.o helpers.o auxlib.o rtp.o crypto.o codeclib.strhash.o \
resample.o dtmflib.o mvr2s_x64_avx2.o mvr2s_x64_avx512.o bufferpool.o uring.o poller.o bencode.o log.o
resample.o dtmflib.o \
../lib/mvr2s_x64_avx2.o \
../lib/mvr2s_x64_avx512.o \
bufferpool.o uring.o poller.o bencode.o log.o
test-kernel-module: test-kernel-module.o $(COMMONOBJS) kernel.o

Loading…
Cancel
Save