view mpcommon.mak @ 26360:a48df598c055

Split cfg-common.h into two separate header files. It was being included twice with different definitions set that activated either the lower or the upper half of the header. The effectively simulated using two different header files. It is more straightforward to split the header instead.
author diego
date Fri, 11 Apr 2008 09:48:36 +0000
parents 7abf7a9345d9
children bd6f5e7c0d37
line wrap: on
line source

SRCS_COMMON          += $(SRCS_COMMON-yes)
SRCS_MPLAYER         += $(SRCS_MPLAYER-yes)
SRCS_MENCODER        += $(SRCS_MENCODER-yes)

OBJS_COMMON    += $(addsuffix .o, $(basename $(SRCS_COMMON)) )
OBJS_MPLAYER   += $(addsuffix .o, $(basename $(SRCS_MPLAYER)) )
OBJS_MENCODER  += $(addsuffix .o, $(basename $(SRCS_MENCODER)) )

CFLAGS += $(CFLAGS-yes) $(OPTFLAGS)

LIBS-$(MPLAYER)  += $(LIBNAME_MPLAYER)
LIBS-$(MENCODER) += $(LIBNAME_MENCODER)
LIBS              = $(LIBNAME_COMMON) $(LIBS-yes)

libs: $(LIBS)

$(LIBNAME_COMMON):   $(OBJS_COMMON)
$(LIBNAME_MPLAYER):  $(OBJS_MPLAYER)
$(LIBNAME_MENCODER): $(OBJS_MENCODER)
$(LIBNAME_COMMON) $(LIBNAME_MPLAYER) $(LIBNAME_MENCODER):
	$(AR) r $@ $^
	$(RANLIB) $@

clean::
	rm -f *.o *.a *.ho *~

distclean:: clean
	rm -f .depend test test2

dep depend:: $(SRCS_COMMON) $(SRCS_MPLAYER) $(SRCS_MENCODER)
	$(MPDEPEND_CMD) > .depend

%.ho: %.h
	$(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<

ALLHEADERS = $(wildcard *.h)
checkheaders: $(ALLHEADERS:.h=.ho)

-include .depend

.PHONY: libs clean distclean dep depend