Add proper license header.
[ffmpeg.git] / Makefile
index 45f226c..574b722 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,21 +8,21 @@ 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
+       -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -DHAVE_AV_CONFIG_H
 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)))
+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))
+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)
@@ -45,7 +45,7 @@ LDFLAGS := -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT
 EXTRALIBS := -lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)
 
 ifeq ($(CONFIG_SWSCALER),yes)
-LDFLAGS+=-L./libswscale
+LDFLAGS+=-L$(BUILD_ROOT)/libswscale
 EXTRALIBS+=-lswscale$(BUILDSUF)
 endif
 
@@ -84,16 +84,15 @@ version.h:
        $(SRC_PATH)/version.sh $(SRC_PATH)
 
 output_example$(EXESUF): output_example.o .libs
-       $(CC) $(LDFLAGS) -o $@ output_example.o $(EXTRALIBS)
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(EXTRALIBS)
 
 qt-faststart$(EXESUF): qt-faststart.c
        $(CC) $(CFLAGS) $< -o $@
 
 cws2fws$(EXESUF): cws2fws.c
-       $(CC) $< -o $@ -lz
+       $(CC) $(CFLAGS) $< -o $@ -lz
 
-ffplay.o: ffplay.c
-       $(CC) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $<
+ffplay.o: CFLAGS += $(SDL_CFLAGS)
 
 ffmpeg.o ffplay.o ffserver.o: version.h
 
@@ -184,7 +183,6 @@ 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
@@ -215,7 +213,7 @@ clean:
        $(MAKE) -C libpostproc clean
        $(MAKE) -C libswscale  clean
        $(MAKE) -C vhook       clean
-       rm -f *.o *.d *~ .libs gmon.out TAGS $(ALLPROGS) $(ALLPROGS_G) \
+       rm -f *.o *~ .libs gmon.out TAGS $(ALLPROGS) $(ALLPROGS_G) \
           output_example$(EXESUF) qt-faststart$(EXESUF) cws2fws$(EXESUF)
        rm -f doc/*.html doc/*.pod doc/*.1
        rm -rf tests/vsynth1 tests/vsynth2 tests/data tests/asynth1.sw tests/*~