2007-03-13 12:10:57 +00:00
|
|
|
SRCS_COMMON += $(SRCS_COMMON-yes)
|
|
|
|
SRCS_MPLAYER += $(SRCS_MPLAYER-yes)
|
|
|
|
SRCS_MENCODER += $(SRCS_MENCODER-yes)
|
2006-11-27 13:32:24 +00:00
|
|
|
|
2007-03-31 23:33:30 +00:00
|
|
|
OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON)) )
|
|
|
|
OBJS_MPLAYER += $(addsuffix .o, $(basename $(SRCS_MPLAYER)) )
|
|
|
|
OBJS_MENCODER += $(addsuffix .o, $(basename $(SRCS_MENCODER)) )
|
2006-11-26 18:12:36 +00:00
|
|
|
|
2007-07-17 10:55:36 +00:00
|
|
|
CFLAGS += $(CFLAGS-yes) $(OPTFLAGS)
|
2006-11-26 18:12:36 +00:00
|
|
|
|
2007-03-13 12:10:57 +00:00
|
|
|
LIBS-$(MPLAYER) += $(LIBNAME_MPLAYER)
|
|
|
|
LIBS-$(MENCODER) += $(LIBNAME_MENCODER)
|
|
|
|
LIBS = $(LIBNAME_COMMON) $(LIBS-yes)
|
2006-11-27 01:40:39 +00:00
|
|
|
|
2007-03-13 10:14:05 +00:00
|
|
|
libs: $(LIBS)
|
2006-11-26 18:12:36 +00:00
|
|
|
|
2007-03-13 12:10:57 +00:00
|
|
|
$(LIBNAME_COMMON): $(OBJS_COMMON)
|
|
|
|
$(LIBNAME_MPLAYER): $(OBJS_MPLAYER)
|
|
|
|
$(LIBNAME_MENCODER): $(OBJS_MENCODER)
|
|
|
|
$(LIBNAME_COMMON) $(LIBNAME_MPLAYER) $(LIBNAME_MENCODER):
|
2006-11-27 01:40:39 +00:00
|
|
|
$(AR) r $@ $^
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
2006-11-26 18:12:36 +00:00
|
|
|
clean::
|
2008-03-03 09:59:11 +00:00
|
|
|
rm -f *.o *.a *.ho *~
|
2006-11-26 18:12:36 +00:00
|
|
|
|
|
|
|
distclean:: clean
|
2008-04-18 22:49:17 +00:00
|
|
|
rm -f *.d .depend test test2
|
2006-11-26 18:12:36 +00:00
|
|
|
|
2008-04-18 21:46:52 +00:00
|
|
|
.depend: $(SRCS_COMMON) $(SRCS_MPLAYER) $(SRCS_MENCODER)
|
|
|
|
$(MPDEPEND_CMD) > $@
|
2006-11-26 18:12:36 +00:00
|
|
|
|
2008-04-18 22:49:17 +00:00
|
|
|
%.d: %.c
|
|
|
|
$(MPDEPEND_CMD) > $@
|
|
|
|
|
2008-03-03 09:59:11 +00:00
|
|
|
%.ho: %.h
|
|
|
|
$(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
|
|
|
|
|
|
|
|
ALLHEADERS = $(wildcard *.h)
|
|
|
|
checkheaders: $(ALLHEADERS:.h=.ho)
|
|
|
|
|
2008-04-18 22:49:17 +00:00
|
|
|
# Hack to keep .depend from being generated at the top level unnecessarily.
|
|
|
|
ifndef DEPS
|
|
|
|
DEPS = .depend
|
|
|
|
endif
|
|
|
|
-include $(DEPS)
|
2007-03-12 23:26:02 +00:00
|
|
|
|
2008-04-13 21:23:27 +00:00
|
|
|
.PHONY: libs *clean dep depend
|