mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-22 18:01:54 +01:00
* insert last SVN-Rev (#define SVN_REV) also in use of TortoiseSVN
* all files that refere SVN_REV are automatically recompile
This commit is contained in:
parent
a66f10db11
commit
f3296b3570
4
Makefile
4
Makefile
@ -21,13 +21,12 @@ SOURCES := source source/libwiigui source/images source/fonts source/sounds \
|
||||
source/usbloader source/xml source/network source/settings source/prompts \
|
||||
source/ramdisc source/wad source/banner source/cheats source/homebrewboot
|
||||
INCLUDES := source
|
||||
SVNDEV := -D'SVN_REV="$(shell svnversion -n ..)"'
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
CFLAGS = -g -O2 -save-temps -Wall $(SVNDEV) $(MACHDEP) $(INCLUDE)
|
||||
CFLAGS = -g -O2 -save-temps -Wall $(MACHDEP) $(INCLUDE)
|
||||
CXXFLAGS = -Xassembler -aln=$@.lst $(CFLAGS)
|
||||
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80c00000
|
||||
|
||||
@ -124,6 +123,7 @@ release:
|
||||
else
|
||||
|
||||
DEPENDS := $(OFILES:.o=.d)
|
||||
SVNREV := $(shell ../svnrev.sh)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "settings/cfg.h"
|
||||
#include "main.h"
|
||||
#include "http.h"
|
||||
#include "svnrev.h"
|
||||
|
||||
#define PORT 4299
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "wad/wad.h"
|
||||
#include "unzip/unzip.h"
|
||||
#include "zlib.h"
|
||||
#include "svnrev.h"
|
||||
|
||||
|
||||
/*** Variables that are also used extern ***/
|
||||
|
17
svnrev.sh
Normal file
17
svnrev.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
a=$(svnversion -n ..)
|
||||
[ -n "$a" ] || a=$(SubWCRev .. | tr -d '\n' | sed 's/[^0-9]*\([0-9]*\).*/\1/')
|
||||
|
||||
[ -f ../source/svnrev.h ] || touch ../source/svnrev.h
|
||||
|
||||
b=$(cat ../source/svnrev.h | tr -d '\n' | sed 's/[^0-9]*\([0-9]*\).*/\1/')
|
||||
|
||||
if [ $a -ne $b ]; then
|
||||
echo '#ifndef SVNREV_H' > ../source/svnrev.h
|
||||
echo ' #define SVNREV_H' >> ../source/svnrev.h
|
||||
echo ' #define SVN_REV "'$a'"' >> ../source/svnrev.h
|
||||
echo '#endif /* SVNREV_H */' >> ../source/svnrev.h
|
||||
echo 'svnrev.h changed' >&2
|
||||
fi
|
||||
echo $a
|
Loading…
Reference in New Issue
Block a user