[FFmpeg-devel] how to modify the makefile
ffmpeg dev
ffmpeg1
Sat Jun 23 12:30:04 CEST 2007
hi;
i am working on a ffmpeg project.I dont need all fmpeg source files.So i deleted the files and folders that i dont need(libavutil,libavcodec...) and modified the makefile . the makefile compiled successfully all the files but when linking i got many error: undefined reference to...
could you tell me how to fix this on the makefile below.thx
#
# Main ffmpeg Makefile
# (c) 2000-2004 Fabrice Bellard
#
include config.mak
VPATH=$(SRC_PATH_BARE)
CFLAGS=$(OPTFLAGS) -I$(BUILD_ROOT) -I$(SRC_PATH)
#-I$(SRC_PATH)/libavutil \
# -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libswscale \
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE
LDFLAGS+= -g
PROGS-$(CONFIG_FFMPEG) += ffmpeg
# # PROGS-$(CONFIG_FFPLAY) += ffplay
# # PROGS-$(CONFIG_FFSERVER) += ffserver
PROGS = $(addsuffix $(EXESUF), $(PROGS-yes))
PROGS_G = $(addsuffix _g$(EXESUF), $(PROGS-yes))
MANPAGES = $(addprefix doc/, $(addsuffix .1, $(PROGS-yes)))
BASENAMES=ffmpeg
# # ffplay ffserver
ALLPROGS=$(addsuffix $(EXESUF), $(BASENAMES))
ALLPROGS_G=$(addsuffix _g$(EXESUF), $(BASENAMES))
ALLMANPAGES=$(addsuffix .1, $(BASENAMES))
#ifeq ($(BUILD_SHARED),yes)
#DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF)
#else
#DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF)
#endif
# # ifeq ($(CONFIG_VHOOK),yes)
# # all: videohook
# # install: install-vhook
# # endif
# # ifeq ($(BUILD_DOC),yes)
# # all: documentation
# # install: install-man
# # endif
SRCS = $(addsuffix .c, $(PROGS-yes)) cmdutils.c
#LDFLAGS := -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil $(LDFLAGS)
EXTRALIBS := $(EXTRALIBS)
#ifeq ($(CONFIG_SWSCALER),yes)
#LDFLAGS+=-L./libswscale
#EXTRALIBS+=-lswscale$(BUILDSUF)
#endif
all: lib $(PROGS)
#lib:
# $(MAKE) -C libavutil all
# $(MAKE) -C libavcodec all
# $(MAKE) -C libavformat all
# # ifeq ($(CONFIG_PP),yes)
# # $(MAKE) -C libpostproc all
# # endif
#ifeq ($(CONFIG_SWSCALER),yes)
# $(MAKE) -C libswscale all
#endif
ffmpeg_g$(EXESUF): .libs cmdutils.o \
ffmpeg.o \
undef.o\
cutils.o os_support.o allformats.o \
riff.o format_raw.o avienc.o avidec.o mpeg.o mpegtsenc.o \
framehook.o avio.o aviobuf.o file.o mpegts.o \
img2.o ffm.o dvformat.o\
mathematics.o \
rational.o \
intfloat_readwrite.o \
crc.o \
crcutil.o \
md5.o \
lls.o \
adler32.o \
log.o \
mem.o \
fifo.o \
tree.o \
lzo.o \
random.o \
aes.o \
base64.o \
mpegvideo.o \
mpeg12.o \
imgconvert.o \
motion_est.o \
jrevdct.o \
jfdctfst.o \
jfdctint.o\
mjpeg.o \
dsputil.o \
error_resilience.o \
h263.o \
opt.o\
bitstream.o\
bitstream_filter.o\
parser.o\
resample.o\
resample2.o\
raw.o\
simple_idct.o\
h264idct.o \
cavsdsp.o\
vc1dsp.o\
vorbis.o\
faandct.o\
vp3dsp.o\
rv10.o\
eval.o\
mpegaudiodec.o \
h263dec.o\
ratecontrol.o\
rangecoder.o\
mdct.o\
vorbis_data.o\
msmpeg4.o\
fft.o\
h261.o\
vc1.o\
imgresample.o\
dpcm.o\
ac3.o\
dvbsub.o\
dvbsubdec.o\
dvdsubenc.o\
dvdsubdec.o\
format_utils.o\
allcodecs.o\
utils.o
$(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(EXTRALIBS) $(SDL_LIBS)\
undef.o\
cutils.o os_support.o allformats.o \
riff.o format_raw.o avienc.o avidec.o mpeg.o mpegtsenc.o \
framehook.o avio.o aviobuf.o file.o mpegts.o \
img2.o ffm.o dvformat.o\
mathematics.o \
rational.o \
intfloat_readwrite.o \
crc.o \
crcutil.o \
md5.o \
lls.o \
adler32.o \
log.o \
mem.o \
fifo.o \
tree.o \
lzo.o \
random.o \
aes.o \
base64.o \
mpegvideo.o \
mpeg12.o \
imgconvert.o \
motion_est.o \
jrevdct.o \
jfdctfst.o \
jfdctint.o\
mjpeg.o \
dsputil.o \
error_resilience.o \
h263.o \
opt.o\
bitstream.o\
bitstream_filter.o\
parser.o\
resample.o\
resample2.o\
raw.o\
simple_idct.o\
h264idct.o \
cavsdsp.o\
vc1dsp.o\
vorbis.o\
faandct.o\
vp3dsp.o\
rv10.o\
eval.o\
mpegaudiodec.o \
h263dec.o\
ratecontrol.o\
rangecoder.o\
mdct.o\
vorbis_data.o\
msmpeg4.o\
fft.o\
h261.o\
vc1.o\
imgresample.o\
dpcm.o\
ac3.o\
dvdsubenc.o\
dvbsub.o\
format_utils.o\
allcodecs.o\
utils.o
# # ffserver$(EXESUF): ffserver.o .libs
# # $(CC) $(LDFLAGS) $(FFSERVERLDFLAGS) -o $@ ffserver.o $(EXTRALIBS)
# #
# # ffplay_g$(EXESUF): ffplay.o cmdutils.o .libs
# # $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(EXTRALIBS) $(SDL_LIBS)
%$(EXESUF): %_g$(EXESUF)
cp -p $< $@
$(STRIP) $@
SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries
ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES))
version.h: $(SVN_ENTRIES)
endif
version.h:
$(SRC_PATH)/version.sh $(SRC_PATH)
# # output_example$(EXESUF): output_example.o .libs
# # $(CC) $(LDFLAGS) -o $@ output_example.o $(EXTRALIBS)
# #
# # qt-faststart$(EXESUF): qt-faststart.c
# # $(CC) $(CFLAGS) $< -o $@
# #
# # cws2fws$(EXESUF): cws2fws.c
# # $(CC) $< -o $@ -lz
# #
# # ffplay.o: ffplay.c
# # $(CC) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $<
ffmpeg.o : version.h
# # ffplay.o ffserver.o
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
# # videohook: .libs
# # $(MAKE) -C vhook all
# #
# # documentation:
# # $(MAKE) -C doc all
# #
# # install: install-progs install-libs install-headers
# #
# # ifeq ($(BUILD_SHARED),yes)
# # install-progs: $(PROGS) install-libs
# # else
# # install-progs: $(PROGS)
# # endif
# # install -d "$(bindir)"
# # install -c -m 755 $(PROGS) "$(bindir)"
# #
# # # Create the Windows installer.
# # wininstaller: all install
# # makensis ffinstall.nsi
# #
# # install-man:
# # install -d "$(mandir)/man1"
# # install -m 644 $(MANPAGES) "$(mandir)/man1"
# #
# # install-vhook:
# # $(MAKE) -C vhook install
# #
# # install-libs:
# # $(MAKE) -C libavutil install-libs
# # $(MAKE) -C libavcodec install-libs
# # $(MAKE) -C libavformat install-libs
# # ifeq ($(CONFIG_PP),yes)
# # $(MAKE) -C libpostproc install-libs
# # endif
# # ifeq ($(CONFIG_SWSCALER),yes)
# # $(MAKE) -C libswscale install-libs
# # endif
# #
# # ifeq ($(BUILD_SHARED),yes)
# # -$(LDCONFIG)
# # endif
# #
# # install-headers:
# # $(MAKE) -C libavutil install-headers
# # $(MAKE) -C libavcodec install-headers
# # $(MAKE) -C libavformat install-headers
# # ifeq ($(CONFIG_PP),yes)
# # $(MAKE) -C libpostproc install-headers
# # endif
# # $(MAKE) -C libswscale install-headers
# #
# # uninstall: uninstall-progs uninstall-libs uninstall-headers uninstall-man uninstall-vhook
# #
# # uninstall-progs:
# # rm -f $(addprefix $(bindir)/, $(ALLPROGS))
# #
# # uninstall-man:
# # rm -f $(addprefix $(mandir)/man1/,$(ALLMANPAGES))
# #
# # uninstall-vhook:
# # $(MAKE) -C vhook uninstall
# #
# # uninstall-libs:
# # $(MAKE) -C libavutil uninstall-libs
# # $(MAKE) -C libavcodec uninstall-libs
# # $(MAKE) -C libavformat uninstall-libs
# # $(MAKE) -C libpostproc uninstall-libs
# #
# # uninstall-headers:
# # $(MAKE) -C libavutil uninstall-headers
# # $(MAKE) -C libavcodec uninstall-headers
# # $(MAKE) -C libavformat uninstall-headers
# # $(MAKE) -C libpostproc uninstall-headers
# # -rmdir "$(incdir)"
# # -rmdir "$(prefix)/include/postproc"
depend dep: .depend
# $(MAKE) -C libavutil depend
# $(MAKE) -C libavcodec depend
# $(MAKE) -C libavformat depend
# # ifeq ($(CONFIG_PP),yes)
# # $(MAKE) -C libpostproc depend
# # endif
#ifeq ($(CONFIG_SWSCALER),yes)
# $(MAKE) -C libswscale depend
#endif
# # ifeq ($(CONFIG_VHOOK),yes)
# # $(MAKE) -C vhook depend
# # endif
.depend: $(SRCS) version.h
$(CC) -MM $(CFLAGS) $(SDL_CFLAGS) $(filter-out %.h,$^) 1>.depend
$(DEP_LIBS): lib
.libs: $(DEP_LIBS)
touch $@
clean:
# $(MAKE) -C libavutil clean
# $(MAKE) -C libavcodec clean
# $(MAKE) -C libavformat clean
# $(MAKE) -C libpostproc clean
# $(MAKE) -C libswscale clean
# $(MAKE) -C tests clean
# $(MAKE) -C vhook clean
# $(MAKE) -C doc clean
rm -f *.o *.d *~ .libs gmon.out TAGS $(ALLPROGS) $(ALLPROGS_G) \
output_example$(EXESUF) qt-faststart$(EXESUF) cws2fws$(EXESUF)
distclean: clean
# $(MAKE) -C libavutil distclean
# $(MAKE) -C libavcodec distclean
# $(MAKE) -C libavformat distclean
# $(MAKE) -C libpostproc distclean
# $(MAKE) -C libswscale distclean
# $(MAKE) -C tests distclean
# $(MAKE) -C vhook distclean
rm -f .depend version.h config.* *.pc
#TAGS:
# etags *.[ch] libavformat/*.[ch] libavcodec/*.[ch]
# regression tests
codectest libavtest test-server fulltest test mpeg4 mpeg: $(PROGS)
$(MAKE) -C tests $@
.PHONY: all lib videohook documentation install* wininstaller uninstall*
.PHONY: dep depend clean distclean TAGS
.PHONY: codectest libavtest test-server fulltest test mpeg4 mpeg
-include .depend
---------------------------------
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
More information about the ffmpeg-devel
mailing list