surroundize

Tool/PipeWire filter to convert stereo audio to surround
git clone https://git.neptards.moe/u3shit/surroundize.git
Log | Files | Refs | README | LICENSE

Makefile (1411B)


      1 WARN_FLAGS := -Wall -Wextra -Werror=unused-result -Wimplicit-fallthrough \
      2 	-Wmissing-prototypes -Wno-missing-field-initializers -Wno-c99-designator \
      3 	-Wno-dangling-else # FFS
      4 BASE_CXXFLAGS := -std=c++20 -MMD -MP $(WARN_FLAGS) \
      5 	-fPIC -fvisibility=hidden -fdata-sections -ffunction-sections
      6 BASE_LDFLAGS := -Wl,--gc-sections,-z,defs
      7 
      8 CXX := clang++
      9 CXXFLAGS ?= -O2 -march=native -g
     10 
     11 .PHONY : all clean make_sig
     12 
     13 BINARIES := surroundize-converter surroundize-pipewire
     14 BASE_O := decoder.o ffdshow/ffdshow_decoder.o ffdshow/firfilter.o freesurround/channelmaps.o freesurround/freesurround_decoder.o freesurround/kiss_fft.o freesurround/kiss_fftr.o freesurround_wrapper.o options.o pw_decoder.o
     15 ALL_O := $(BASE_O) converter.o pipewire.o
     16 
     17 all: $(BINARIES)
     18 clean:
     19 	rm -f $(BINARIES) *.[do] ffdshow/*.[do] freesurround/*.[do] .sig
     20 
     21 .sig: make_sig
     22 	@export X='$(CXX)|$(BASE_CXXFLAGS)|$(BASE_LDFLAGS)|$(CXXFLAGS)|$(LDFLAGS)'; \
     23 	echo "$$X" | cmp -s - $@ || echo "$$X" > $@
     24 
     25 # outputs
     26 surroundize-converter: $(BASE_O) converter.o
     27 	$(CXX) $(BASE_LDFLAGS) $(LDFLAGS) -o $@ $^
     28 
     29 surroundize-pipewire: $(BASE_O) pipewire.o
     30 	$(CXX) $(BASE_LDFLAGS) $(LDFLAGS) $$(pkg-config --libs libpipewire-0.3) -o $@ $^
     31 
     32 # files
     33 %.o: %.cpp .sig
     34 	$(CXX) $(BASE_CXXFLAGS) $(CXXFLAGS) -c -o $@ $<
     35 
     36 pipewire.o: pipewire.cpp .sig
     37 	$(CXX) $(BASE_CXXFLAGS) $(CXXFLAGS) $$(pkg-config --cflags libpipewire-0.3) -c -o $@ $<
     38 
     39 -include $(ALL_O:.o=.d)