📄 readme.djgpp
字号:
Compiling LAME with DJGPP by S.T.L. (LAME's homepage is http://www.sulaco.org/mp3, and LAME is distributedunder the LGPL. More information is in the README file)============================================================================(Note: S.T.L. doesn't know C programming (...yet) but he has learnedhow to compile things with DJGPP. He's not providing his E-mail addresshere because he wouldn't know how to answer any questions even if youasked him!)Compiling LAME with DJGPP is actually somewhat easy, though not as easyas you might expect at first glance. Here are step-by-step instructionson how to compile LAME with the latest version of DJGPP. S.T.L. runs aPentium III 600Mhz system using Windows 98 SE. These instructions shouldwork on any Windows 9x system and probably Windows 2000 as well, and forall true Intel Pentium III, Pentium II, Celeron, or Pentium Pro processors.The instructions can be made to work (with less optimization) on otherprocessors including Pentium (MMX or not), 486, 386, and K6. Also thismight work under DOS, but I haven't tried it. S.T.L. takes no responsibilityfor what you do with these instructions. Now, let's get compiling!1) Find and install DJGPP. It's at www.delorie.com. They have a Zip Pickerthere that makes the process easy and painless.2) Download the LAME sourcecode, preferably the latest version. Extract itto a directory using WinZip or another decompressor set to preserve thedirectory structure. Hopefully you already have done this, as you're readingthis file!3) Create a new directory wherever. I called mine Crud.4) In the directory with all the .c and .h files (and the README, INSTALL, etcfiles), copy all the *.c and *.h files to the Crud directory.5) Go into the Crud directory and delete the following files and no others:debugscalefac.cmp3rtp.cmp3x.crtp.c6) The command (don't type this!)GCC -o LAME_BAD.EXE -DNDEBUG -DLAMESNDFILE -DLAMEPARSE *.cshould now create a terribly unoptimized but working LAME_BAD.EXE. Don't typeit, because optimizations are a good thing and are what you want. I onlyprovide the command so you can use it as a last resort. Here's how to executethe optimized command:7) In the Crud directory, create a new file. I called mine FILE. (In the DOSprompt, typing EDIT FILE will create such a file with no extension). Make itstext consist of:-s -O2 -march=i686 -fomit-frame-pointer -ffast-math -funroll-loops -funroll-all-loops -malign-double -fstrict-aliasing -o LAME.EXE -DNDEBUG -DLAMESNDFILE -DLAMEPARSE *.cThat should be one line in FILE even if it doesn't look like it in NotePador whereever you're reading this. It is case sensitive. If you're curious,you're making this file instead of typing a commandline directlybecause DOS will scream at such a long commandline.***ONLY FOR PENTIUM III, PENTIUM II, CELERON, OR PENTIUM PRO USERS***8) Now, save FILE and go back to the Crud directory. Typing GCC @FILE willnow compile LAME.EXE. It will be heavily optimized - on my machine, it canencode a .WAV file using the -h -b256 -ms options at 5.73X, while theofficial binary I downloaded and ran using those same options only achieved5.32X.9) Have fun!***FOR OTHER PROCESSORS***8a) Using the commandline in (7) won't work for non-P6-core processors.Therefore you must use another commandline. The key is the -march=i686option. If you are running a Pentium (MMX or not), use -march=i586. Forthe 386 and 486, the option should now be self-explanatory! For a K6processor, use -march=k6 . For any other type of processor, you'll justhave to not use the -march option at all, which will cost you someoptimization. If you'd like to create an executable that runs fast on[modern computer X], say a Pentium III, but you still want it to beable to run on any i386 or later computer, use the -mcpu=[CPU TYPEHERE], using the same cpu types as -march= accepts. Themcpu option gives less optimization, though.9a) Have fun!
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -