2012-09-11 09:53:30 +00:00
|
|
|
FILTERS = showqscale telecine tile rectangle
|
2012-08-23 10:32:13 +00:00
|
|
|
COMMON = filterutils.o
|
|
|
|
|
|
|
|
OBJECTS = $(patsubst %,%.o,$(FILTERS)) $(COMMON)
|
|
|
|
HEADERS = $(wildcard *.h)
|
|
|
|
OUT = $(patsubst %,%.so,$(FILTERS))
|
|
|
|
|
2012-09-10 11:03:32 +00:00
|
|
|
CFLAGS ?= -Wall -Wextra -O3 -march=native -mtune=native -ffast-math
|
2012-08-23 10:32:13 +00:00
|
|
|
|
|
|
|
CPPFLAGS += -I../../libmpcodecs
|
|
|
|
CFLAGS += -fPIC
|
|
|
|
LDFLAGS += -shared -fPIC
|
|
|
|
|
2012-09-10 11:03:32 +00:00
|
|
|
ifneq ($(LTO),)
|
|
|
|
CFLAGS += -flto
|
|
|
|
LDFLAGS += $(CFLAGS) -flto
|
|
|
|
endif
|
|
|
|
|
2012-08-23 10:32:13 +00:00
|
|
|
all: $(OUT)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(OBJECTS) $(OUT)
|
|
|
|
|
|
|
|
%.so: %.o $(COMMON)
|
|
|
|
$(CC) $(LDFLAGS) $(LIBS) -o $@ $(COMMON) $<
|
|
|
|
|
|
|
|
# FIXME replace this by real dependency tracking
|
|
|
|
%.o: %.c $(HEADERS)
|
|
|
|
|