%.o: %.asm
$(AS) $(ASFLAGS) -o $@ $<
-.depend: $(SRCS) x264.c
+.depend: $(SRCS) x264.c config.h
rm -f .depend
# Hacky - because gcc 2.9x doesn't have -MT
$(foreach SRC, $(SRCS) x264.c, ( echo -n "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(SRC) -MM -g0 ) 1>> .depend;)
+config.h: $(wildcard .svn/entries */.svn/entries)
+ ./version.sh
+
depend: .depend
ifneq ($(wildcard .depend),)
include .depend
endif
clean:
- rm -f $(OBJS) $(OBJASM) *.a x264.o .depend x264 TAGS
+ rm -f $(OBJS) $(OBJASM) config.h *.a x264.o .depend x264 TAGS
distclean: clean
@mkdir -p $(DIR_BUILD)/$(@D)
@$(CC) $(CFLAGS) -c -o $(DIR_BUILD)/$@ $<
+encoder/set.c: config.h
+config.h:
+ @echo " C: $@"
+ @cd $(DIR_SRC) && \
+ ./version.sh
+
libx264.a: $(DIR_BUILD) $(OBJECTS)
@echo " L: $(@F)"
@cd $(DIR_BUILD) && \
clean:
@echo " Cl: Object files and target lib"
- @$(RM) $(DIR_BUILD)
+ @$(RM) $(DIR_BUILD) $(DIR_SRC)/config.h
install: x264.exe
install x264.h $(DIR_INSTALL)/include/
#include "x264.h"
#include "common/bs.h"
#include "common/set.h"
+#include "config.h"
void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param )
{
};
char version[256];
int length;
- sprintf( version, "x264 - core %d - H.264/MPEG-4 AVC codec - Copyleft 2005 - http://www.videolan.org/x264.html",
- X264_BUILD );
+ sprintf( version, "x264 - core %d%s - H.264/MPEG-4 AVC codec - Copyleft 2005 - http://www.videolan.org/x264.html",
+ X264_BUILD, X264_VERSION );
length = strlen(version)+1+16;
bs_write( s, 8, 0x5 ); // payload_type = user_data_unregistered
--- /dev/null
+#!/bin/sh
+VER=`svnversion .`
+if [[ $VER && $VER != exported ]]
+then echo "#define X264_VERSION \" svn-$VER\"" > config.h
+else echo "#define X264_VERSION \"\"" > config.h
+fi
**************************************************************************/
#include "x264vfw.h"
+#include "config.h"
#include <stdio.h> /* sprintf */
#include <commctrl.h>
case WM_INITDIALOG :
{
char temp[1024];
- sprintf( temp, "Core %d, build %s %s", X264_BUILD, __DATE__, __TIME__ );
+ sprintf( temp, "Core %d%s, build %s %s", X264_BUILD, X264_VERSION, __DATE__, __TIME__ );
SetDlgItemText( hDlg, IDC_BUILD, temp );
break;
}
#endif
#include "common/common.h"
+#include "config.h"
#include "x264.h"
#define DATA_MAX 3000000
static void Help( x264_param_t *defaults )
{
fprintf( stderr,
- "x264 build:%d\n"
- "Syntax: x264 [options] [-o out.h26l] in.yuv widthxheigh\n"
+ "x264 build:%d%s\n"
+ "Syntax: x264 [options] [-o out.264] in.yuv widthxheigh\n"
"\n"
" -h, --help Print this help\n"
"\n"
" --quiet Quiet Mode\n"
" -v, --verbose Print stats for each frame\n"
"\n",
- X264_BUILD,
+ X264_BUILD, X264_VERSION,
defaults->i_keyint_max,
defaults->i_keyint_min,
defaults->i_scenecut_threshold,