mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-27 21:40:34 +00:00
a862c7d336
The gcov/lcov are a common toolchain for visualizing code coverage with the GNU/Toolchain. The documentation and implementation of this integration was heavily inspired from the blog entry by Mike Melanson: http://multimedia.cx/eggs/using-lcov-with-ffmpeg/
68 lines
1.9 KiB
Makefile
68 lines
1.9 KiB
Makefile
#
|
|
# common bits used by all libraries
|
|
#
|
|
|
|
# first so "all" becomes default target
|
|
all: all-yes
|
|
|
|
include $(SRC_PATH)/arch.mak
|
|
|
|
OBJS += $(OBJS-yes)
|
|
FFLIBS := $(FFLIBS-yes) $(FFLIBS)
|
|
TESTPROGS += $(TESTPROGS-yes)
|
|
|
|
LDLIBS = $(FFLIBS:%=%$(BUILDSUF))
|
|
FFEXTRALIBS := $(LDLIBS:%=$(LD_LIB)) $(EXTRALIBS)
|
|
|
|
EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF))
|
|
OBJS := $(sort $(OBJS:%=$(SUBDIR)%))
|
|
TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o)
|
|
TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF))
|
|
HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o)
|
|
HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF))
|
|
TOOLS += $(TOOLS-yes)
|
|
TOOLOBJS := $(TOOLS:%=tools/%.o)
|
|
TOOLS := $(TOOLS:%=tools/%$(EXESUF))
|
|
HEADERS += $(HEADERS-yes)
|
|
|
|
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
|
|
|
|
SRC_DIR := $(SRC_PATH)/lib$(NAME)
|
|
ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
|
|
SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
|
|
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
|
|
HOBJS = $(filter-out $(SKIPHEADERS:.h=.h.o),$(ALLHEADERS:.h=.h.o))
|
|
checkheaders: $(HOBJS)
|
|
.SECONDARY: $(HOBJS:.o=.c)
|
|
|
|
alltools: $(TOOLS)
|
|
|
|
$(HOSTOBJS): %.o: %.c
|
|
$(call COMPILE,HOSTCC)
|
|
|
|
$(HOSTPROGS): %$(HOSTEXESUF): %.o
|
|
$(HOSTLD) $(HOSTLDFLAGS) $(HOSTLD_O) $< $(HOSTLIBS)
|
|
|
|
$(OBJS): | $(sort $(dir $(OBJS)))
|
|
$(HOBJS): | $(sort $(dir $(HOBJS)))
|
|
$(HOSTOBJS): | $(sort $(dir $(HOSTOBJS)))
|
|
$(TESTOBJS): | $(sort $(dir $(TESTOBJS)))
|
|
$(TOOLOBJS): | tools
|
|
|
|
OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOBJS) $(HOSTOBJS) $(TESTOBJS))
|
|
|
|
CLEANSUFFIXES = *.d *.o *~ *.h.c *.map *.ver *.gcno *.gcda
|
|
DISTCLEANSUFFIXES = *.pc
|
|
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a
|
|
|
|
define RULES
|
|
clean::
|
|
$(RM) $(OBJS) $(OBJS:.o=.d)
|
|
$(RM) $(HOSTPROGS)
|
|
$(RM) $(TOOLS)
|
|
endef
|
|
|
|
$(eval $(RULES))
|
|
|
|
-include $(wildcard $(OBJS:.o=.d) $(HOSTOBJS:.o=.d) $(TESTOBJS:.o=.d) $(HOBJS:.o=.d))
|