mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
enable version.h to be created from subdirs
Originally committed as revision 13819 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
74d9441715
commit
9e6165b53e
8
Makefile
8
Makefile
@ -67,14 +67,6 @@ ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
|
||||
%_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
|
||||
$(CC) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
|
||||
|
||||
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 $(FF_DEP_LIBS)
|
||||
$(CC) $(CFLAGS) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
||||
|
||||
|
18
common.mak
18
common.mak
@ -9,10 +9,16 @@ vpath %.c $(SRC_DIR)
|
||||
vpath %.h $(SRC_DIR)
|
||||
vpath %.S $(SRC_DIR)
|
||||
|
||||
ifeq ($(SRC_DIR),$(SRC_PATH_BARE))
|
||||
BUILD_ROOT_REL = .
|
||||
else
|
||||
BUILD_ROOT_REL = ..
|
||||
endif
|
||||
|
||||
ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
|
||||
|
||||
CFLAGS = -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
||||
-D_ISOC9X_SOURCE -I$(BUILD_ROOT) -I$(SRC_PATH) $(OPTFLAGS)
|
||||
CFLAGS := -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
||||
-D_ISOC9X_SOURCE -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
|
||||
@ -34,6 +40,14 @@ CFLAGS = -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
||||
|
||||
%$(EXESUF): %.c
|
||||
|
||||
SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries
|
||||
ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES))
|
||||
$(BUILD_ROOT_REL)/version.h: $(SVN_ENTRIES)
|
||||
endif
|
||||
|
||||
$(BUILD_ROOT_REL)/version.h:
|
||||
$(SRC_PATH)/version.sh $(SRC_PATH) $@
|
||||
|
||||
install: install-libs install-headers
|
||||
|
||||
uninstall: uninstall-libs uninstall-headers
|
||||
|
2
configure
vendored
2
configure
vendored
@ -969,7 +969,7 @@ SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
|
||||
LIB_INSTALL_EXTRA_CMD='$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
|
||||
|
||||
# gcc stupidly only outputs the basename of targets with -MM
|
||||
DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/,"'
|
||||
DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/," -e "s,[[:space:]]version\\.h,\$$(BUILD_ROOT_REL)/&,"'
|
||||
|
||||
# find source path
|
||||
source_path="`dirname \"$0\"`"
|
||||
|
@ -20,5 +20,5 @@ OLD_REVISION=`cat version.h 2> /dev/null`
|
||||
|
||||
# Update version.h only on revision changes to avoid spurious rebuilds
|
||||
if test "$NEW_REVISION" != "$OLD_REVISION"; then
|
||||
echo "$NEW_REVISION" > version.h
|
||||
echo "$NEW_REVISION" > "$2"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user