⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure

📁 编译后直接运行的MP3播放器全部C语言源代码 一个包含FAT文件系统、系统引导 Boot、FLASH Driver等内容的
💻
字号:
#!/bin/sh#             __________               __   ___.#   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___#   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /#   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <#   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \#                     \/            \/     \/    \/            \/# $Id: configure,v 1.55 2003/12/12 10:48:40 bagder Exp $### Begin Function Definitions#input() {    read response    echo $response}whichsim () {if [ -z "$simver" ]; then  ##################################################################  # Figure out win32/x11 GUI  #  echo ""  echo "Build (W)in32 or  (X)11 GUI version? (X)"  option=`input`;  case $option in   [Ww])     simver="win32"     ;;   *)     simver="x11"     ;;   esac   echo "Selected $simver simulator"fi}simul () { ################################################################## # Figure out where the firmware code is! # # a file to check for in the uisimulator root dir simfile="$simver/lcd-$simver.c"  for dir in uisimulator . .. ../uisimulator ../../uisimulator; do   if [ -f "$dir/$simfile" ]; then     simdir="$dir/$simver"     break   fi done if [ -z "$simdir" ]; then   echo "This script couldn't find your uisimulator/$simver directory. Please enter the"   echo "full path to your uisimulator/$simver directory here:"   simdir=`input` fised > Makefile \ -e "s,@SIMDIR@,${simdir},g" \ -e "s,@TOOLSDIR@,${toolsdir},g" \ -e "s,@TARGET@,${target},g" \ -e "s,@ARCHOS@,${archos},g" \ -e "s,@DEBUG@,${debug},g" \ -e "s,@DISPLAY@,${display},g" \ -e "s,@KEYPAD@,${keypad},g" \ -e "s,@PWD@,${pwd},g" \ -e "s,@LANGUAGE@,${language},g" \ -e "s,@SIMVER@,${simver},g" \<<EOF ## Automaticly generated. http://rockbox.haxx.seARCHOS=@ARCHOS@SIMDIR=@SIMDIR@TOOLSDIR=@TOOLSDIR@DEBUG=@DEBUG@TARGET=@TARGET@DISPLAY=@DISPLAY@KEYPAD=@KEYPAD@THISDIR="@PWD@"SIMVER=@SIMVER@LANGUAGE=@LANGUAGE@VERSION=\$(shell date +%y%m%d-%H%M).PHONY: all: simsim:	\$(MAKE) -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) LANGUAGE=\$(LANGUAGE)clean:	\$(MAKE) -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) cleantags:	@rm -f TAGS	make -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) tagsEOF  echo "Created Makefile"  if [ -d "archos" ]; then    echo "sub directory archos already present"  else    mkdir archos    echo "created an archos subdirectory for simulating the hard disk"  fi}picklang() {    # figure out which languages that are around    for file in $appsdir/lang/*.lang; do        clean=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`        langs="$langs $clean"    done    num=1    for one in $langs; do        echo "$num. $one"        num=`expr $num + 1`    done    read pick    return $pick;}whichlang() {    num=1    for one in $langs; do        if [ "$num" = "$pick" ]; then            echo $one            return        fi        num=`expr $num + 1`    done}## Beging Build Script#target=$1debug=$2if test "$1" = "--help"; then  echo "Rockbox configure script."  echo "Invoke this in a directory to generate a Makefile to build Rockbox"  echo "Do *NOT* run this within the tools directory!"  exitfiif test -r "configure"; then # this is a check for a configure script in the current directory, it there # is one, try to figure out if it is this one! if { grep "^#   Jukebox" configure >/dev/null 2>&1 ; } then   echo "WEEEEEEEEP. Don't run this configure script within the tools directory."   echo "It will only cause you pain and grief. Instead do this:"   echo ""   echo " cd .."   echo " mkdir build-dir"   echo " cd build-dir"   echo " ../tools/configure"   echo ""   echo "Much happiness will arise from this. Enjoy"   exit fifiif [ "$target" = "--help" -o \     "$target" = "-h" ]; then  echo "Just invoke the script and answer the questions."  echo "This script will write a Makefile for you"  exitfi# get our current directorypwd=`pwd`;if [ "$target" = "update" ]; then  update="1"  target=""  if [ -f Makefile ]; then    if { grep "^## Auto" Makefile >/dev/null 2>&1 ; } then      echo "Existing generated Makefile found. Getting defaults from it."      archos=`grep "^ARCHOS=" Makefile | cut -d= -f2-`      target=`grep "^TARGET=" Makefile | cut -d= -f2-`      debug=`grep "^DEBUG=" Makefile | cut -d= -f2-`      language=`grep "^LANGUAGE=" Makefile | cut -d= -f2-`      memory=`grep "^MEMORYSIZE=" Makefile | cut -d= -f2-`      if [ "$debug" = "SIMULATOR=1" ]; then        simulator="yes"        display=`grep "^DISPLAY=" Makefile | cut -d= -f2-`        keypad=`grep "^KEYPAD=" Makefile | cut -d= -f2-`        simver=`grep "^SIMVER=" Makefile | cut -d= -f2-`      fi    fi  fielseecho "This script will setup your Rockbox build environment."echo "Further docs here: http://rockbox.haxx.se/docs/"echo ""fiif [ -z "$archos" ]; then################################################################### Figure out target platform#  echo "Enter target platform: (default is Archos Recorder)"  echo "1 - Archos Player/Studio"  echo "2 - Archos Recorder"  echo "3 - Archos FM Recorder"  echo "4 - Archos Recorder v2"  echo "5 - Neo mStation"  echo "6 - Neo 35"  getit=`input`;  case $getit in   1)    archos="player"    target="-DARCHOS_PLAYER"    display="-DHAVE_LCD_CHARCELLS"    keypad="-DHAVE_PLAYER_KEYPAD"    ;;   3)    archos="fmrecorder"    target="-DARCHOS_FMRECORDER"    display="-DHAVE_LCD_BITMAP"    keypad="-DHAVE_RECORDER_KEYPAD"    ;;   4)    archos="recorderv2"    target="-DARCHOS_RECORDERV2"    display="-DHAVE_LCD_BITMAP"    keypad="-DHAVE_RECORDER_KEYPAD"    ;;   5)    archos="neomstation"    target="-DNEO_MSTATION"    display="-DHAVE_NEOLCD_CHARCELLS"    keypad="-DHAVE_NEO_KEYPAD"    ;;   6)    archos="neo35"    target="-DNEO_35"    display="-DHAVE_NEOLCD_CHARCELLS"    keypad="-DHAVE_NEO_KEYPAD"    ;;   *)    archos="recorder"    target="-DARCHOS_RECORDER"    display="-DHAVE_LCD_BITMAP"    keypad="-DHAVE_RECORDER_KEYPAD"    ;;  esac  echo "Platform set to $archos"fiif [ -z "$memory" ]; then  size="2"  if [ -z "$update" ]; then    echo "Enter size of your RAM (in MB): (defaults to 2)"    size=`input`;  fi  case $size in   8)    memory="8"    ;;   *)    memory="2"    ;;  esac  echo "Memory size selected: $memory MB"fiif [ -z "$debug" ]; then  ##################################################################  # Figure out debug on/off  #  echo "Build (N)ormal, (D)ebug or (S)imulated version? (N)"  option=`input`;  case $option in    [Ss])      debug="SIMULATOR=1"      simulator="yes"      echo "Simulator build selected"      whichsim      ;;    [Dd])      debug="DEBUG=1"      echo "Debug build selected"      ;;    *)      debug="NODEBUG=1"      echo "Normal build selected"      ;;  esacfi################################################################### Figure out where the firmware code is!#firmfile="crt0.S" # a file to check for in the firmware root dirfor dir in firmware . .. ../firmware ../../firmware; do  if [ -f $dir/$firmfile ]; then    firmdir=$dir    break  fidoneif [ -z "$firmdir" ]; then  echo "This script couldn't find your firmware directory. Please enter the"  echo "full path to the firmware directory here:"  firmdir=`input`fi################################################################### Figure out where the apps code is!#appsfile="credits.c" # a file to check for in the apps root dirfor dir in apps . .. ../apps ../../apps $firmdir/apps $firmdir/../apps; do    if [ -f $dir/$appsfile ]; then        appsdir=$dir        break    fidoneif [ -z "$appsdir" ]; then    echo "This script couldn't find your apps directory. Please enter the"    echo "full path to the apps directory here:"    appsdir=`input`fi################################################################### Figure out where the tools directory is!#toolsfile="descramble.c" # a file to check for in the tools root dirfor dir in tools . .. ../tools ../../tools $firmdir/tools $firmdir/../tools; do    if [ -f $dir/$toolsfile ]; then        toolsdir="$dir"        break    fidoneif [ -z "$toolsdir" ]; then  # no file found, check if (some of) the necessary tools are in the PATH  # already  toolsexe="scramble"  for dir in `echo $PATH | tr ':' ' '`; do    if [ -x "$dir/$toolsexe" ]; then       echo "found $toolsexe in $dir"       toolsdir="$dir"       break    fi  donefiif [ -z "$toolsdir" ]; then    echo "This script couldn't find your tools directory. Please enter the"    echo "full path to the tools directory here:"    toolsdir=`input`fiif [ -z "$language" ]; then    echo "Select a number for the language to use (default is english)"    picklang    language=`whichlang`    if [ -z "$language" ]; then        # pick a default        language="english"    fi    echo "Language set to $language"fiif [ "yes" = "$simulator" ]; then    # we have already dealt with the simulator Makefile separately    simul    exitfised > Makefile \ -e "s,@FIRMDIR@,${firmdir},g" \ -e "s,@APPSDIR@,${appsdir},g" \ -e "s,@TOOLSDIR@,${toolsdir},g" \ -e "s,@DEBUG@,${debug},g" \ -e "s,@MEMORY@,${memory},g" \ -e "s,@TARGET@,${target},g" \ -e "s,@ARCHOS@,${archos},g" \ -e "s,@LANGUAGE@,${language},g" \ -e "s,@PWD@,${pwd},g" \<<EOF ## Automaticly generated. http://rockbox.haxx.seFIRMDIR=@FIRMDIR@APPSDIR=@APPSDIR@TOOLSDIR=@TOOLSDIR@DEBUG=@DEBUG@ARCHOS=@ARCHOS@TARGET=@TARGET@THISDIR="@PWD@"LANGUAGE=@LANGUAGE@MEMORYSIZE=@MEMORY@VERSION=\$(shell date +%y%m%d-%H%M).PHONY: firmware appsall: firmware appsfirmware:	\$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) MEM=\$(MEMORYSIZE) TOOLSDIR=\$(TOOLSDIR)apps:	\$(MAKE) -C \$(APPSDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) LANGUAGE=\$(LANGUAGE) MEM=\$(MEMORYSIZE) TOOLSDIR=\$(TOOLSDIR)clean-firmware:	\$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) cleanclean-apps:	\$(MAKE) -C \$(APPSDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) cleanclean:	\$(MAKE) clean-firmware clean-appstags-firmware:	\$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) tagstags-apps:	\$(MAKE) -C \$(APPSDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) tagstags:	@rm -f TAGS	\$(MAKE) tags-firmware tags-appsEOFecho "Created Makefile"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -