Remove the legacy makefile based build system
Showing the changes to codec/processing (1 of 4 files). Show all
Unified · Split
| @@ -1,94 +0,0 @@ | |||
| 1 | NASM = 1 | ||
| 2 | NAME = libwelsvp | ||
| 3 | |||
| 4 | OUTDIR = ../../../bin/linux | ||
| 5 | BINDIR = ../../bin | ||
| 6 | OBJDIR = ../../obj | ||
| 7 | SRCDIRS = ../../src/asm \ | ||
| 8 | ../../src/common \ | ||
| 9 | ../../src/adaptivequantization \ | ||
| 10 | ../../src/backgounddetection \ | ||
| 11 | ../../src/denoise \ | ||
| 12 | ../../src/downsample \ | ||
| 13 | ../../src/scenechangedetection \ | ||
| 14 | ../../src/vaacalc \ | ||
| 15 | ../../src/complexityanalysis | ||
| 16 | SRCDIRS += ../../src/imagerotate | ||
| 17 | |||
| 18 | |||
| 19 | TARGETLIB = $(BINDIR)/$(NAME).so | ||
| 20 | |||
| 21 | CC = $(shell which gcc) | ||
| 22 | AS = $(shell which nasm) | ||
| 23 | GCC = gcc -m32 | ||
| 24 | |||
| 25 | CPPFLAGS = -Wall -g -O3 | ||
| 26 | ifeq ($(NASM), 1) | ||
| 27 | CPPFLAGS += -DX86_ASM | ||
| 28 | endif | ||
| 29 | ASMFLAGS = -f elf -DNOPREFIX -I ../../src/asm/ | ||
| 30 | LDFLAGS = -lstdc++ -ldl | ||
| 31 | |||
| 32 | SRCEXTS = .cpp | ||
| 33 | ifeq ($(NASM), 1) | ||
| 34 | SRCEXTS += .asm | ||
| 35 | endif | ||
| 36 | HDREXTS = .h | ||
| 37 | SOURCES = $(foreach d,$(SRCDIRS),$(wildcard $(addprefix $(d)/*,$(SRCEXTS)))) | ||
| 38 | HEADERS = $(foreach d,$(SRCDIRS),$(wildcard $(addprefix $(d)/*,$(HDREXTS)))) | ||
| 39 | SRC_CPP = $(filter %.cpp,$(SOURCES)) | ||
| 40 | SRC_ASM = $(filter %.asm,$(SOURCES)) | ||
| 41 | OBJS = $(addsuffix .o, $(basename $(SOURCES))) | ||
| 42 | DEPS = $(OBJS:.o=.d) | ||
| 43 | |||
| 44 | DEP_OPT = $(shell if `$(CC) --version | grep "GCC" >/dev/null`; then \ | ||
| 45 | echo "-MM -MP"; else echo "-M"; fi ) | ||
| 46 | DEPEND_cpp.d = $(subst -g ,,$(CC) $(DEP_OPT) $(CPPFLAGS)) | ||
| 47 | DEPEND_asm.d = $(subst -g ,,$(AS) $(DEP_OPT) $(ASMFLAGS)) | ||
| 48 | COMPILE.cpp = $(GCC) $(CPPFLAGS) -c | ||
| 49 | COMPILE.asm = $(AS) $(ASMFLAGS) | ||
| 50 | LINK = $(GCC) $(LDFLAGS) | ||
| 51 | |||
| 52 | .PHONY: all objs tags ctags clean distclean | ||
| 53 | |||
| 54 | .SUFFIXES: | ||
| 55 | |||
| 56 | all: $(TARGETLIB) | ||
| 57 | |||
| 58 | %.d:%.cpp | ||
| 59 | @echo -n $(dir $<) > $@ | ||
| 60 | @$(DEPEND_cpp.d) $< >> $@ | ||
| 61 | |||
| 62 | %.d:%.asm | ||
| 63 | @echo -n $(dir $<) > $@ | ||
| 64 | @$(DEPEND_asm.d) $< >> $@ | ||
| 65 | |||
| 66 | objs:$(OBJS) | ||
| 67 | |||
| 68 | %.o:%.cpp | ||
| 69 | $(COMPILE.cpp) $< -o $@ | ||
| 70 | |||
| 71 | %.o:%.asm | ||
| 72 | $(COMPILE.asm) $< -o $@ | ||
| 73 | |||
| 74 | tags: $(HEADERS) $(SOURCES) | ||
| 75 | etags $(HEADERS) $(SOURCES) | ||
| 76 | |||
| 77 | ctags: $(HEADERS) $(SOURCES) | ||
| 78 | ctags $(HEADERS) $(SOURCES) | ||
| 79 | |||
| 80 | $(TARGETLIB):$(OBJS) | ||
| 81 | @if test ! -d $(BINDIR) ; then mkdir -p $(BINDIR) ; fi | ||
| 82 | $(LINK) $(OBJS) -shared -Wl,-Bsymbolic -o $@ | ||
| 83 | @echo produce the lib to $(TARGETLIB). | ||
| 84 | @if test ! -d $(OUTDIR) ; then mkdir -p $(OUTDIR) ; fi | ||
| 85 | @cp -f $(TARGETLIB) $(OUTDIR) | ||
| 86 | @cp -f $(TARGETLIB) ../../../testbin | ||
| 87 | @echo copy the lib to $(OUTDIR). | ||
| 88 | |||
| 89 | clean: | ||
| 90 | rm -f $(OBJS) $(TARGETLIB) | ||
| 91 | |||
| 92 | distclean: clean | ||
| 93 | rm -f $(DEPS) TAGS | ||
| 94 | |||