Skip to content

Commit

Permalink
add fat source
Browse files Browse the repository at this point in the history
  • Loading branch information
chenall committed Feb 15, 2015
1 parent f5ed09e commit 239b2b5
Show file tree
Hide file tree
Showing 17 changed files with 36,451 additions and 0 deletions.
32 changes: 32 additions & 0 deletions g4dext/fat/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#! /bin/sh
#
_TIME_Y=`date +%-Y`
_TIME_m=`date +%-m`
_TIME_d=`date +%-d`
_TIME_H=`date +%-H`
_TIME_M=`date +%-M`
_TIME_S=`date +%-S`
ASMDATE=`date -u +".long "%Y%m%d`
CC=${CC:-gcc}
NOBUILDID=${NOBUILDID:-0}

if [ "$NOBUILDID" = "0" ]; then
BUILDID=-Wl,--build-id=none
else
BUILDID=
fi

echo "#define _TIME_Y $_TIME_Y" >fat_config.h
echo "#define _TIME_m $_TIME_m" >>fat_config.h
echo "#define _TIME_d $_TIME_d" >>fat_config.h
echo "#define _TIME_H $_TIME_H" >>fat_config.h
echo "#define _TIME_M $_TIME_M" >>fat_config.h
echo "#define _TIME_S $_TIME_S" >>fat_config.h
echo "#define GET_FATTIME" >>fat_config.h
gcc -I../../include/ -nostdlib -DASM_BUILD_DATE="\"$ASMDATE"\" -fno-reorder-functions -fno-strict-aliasing -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-zero-initialized-in-bss -fno-function-cse -fno-jump-tables --entry main -Wl,-N $BUILDID -fPIE fat.c ff.c -o fat.o
gcc -I../../include/ -DFAT_MINI -DASM_BUILD_DATE="\"$ASMDATE"\" -nostdlib -fno-reorder-functions -fno-strict-aliasing -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-zero-initialized-in-bss -fno-function-cse -fno-jump-tables --entry main -Wl,-N $BUILDID -fPIE fat.c ff.c -o fatmini.o
objcopy -O binary fat.o fat
objcopy -O binary fatmini.o fatmini
rm fat*.o
date=`date -u +%Y-%m-%d`
zip -9 -r -q "../fat-$date.zip" fat fatmini
Loading

0 comments on commit 239b2b5

Please sign in to comment.