Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo off
- rem ***************************************************************************
- rem Generate script file for the linker to go throuth linker command line too
- rem long trouble under windows (32 000 char max)
- rem ***************************************************************************
- rem Lunch in pre-build step is not advised, this commande is run in paralel
- rem with build step that can temporarie supress obj file need to run
- rem compilation a 2nd time to have a script file up to date for the linker.
- rem Run in pre-build step generate trouble in debug mode.
- rem
- rem Use manual lunch with 2 parameters :
- rem create a .bat file per build with the folowing commande :
- rem gen__link_ld.bat ./project relative path and .ld file name ./project relative build path
- rem in linker commande line pattern replace {INPUT}
- rem by -Xlinker --script=${ProjDirPath}/${ConfigName}/___link.ld
- rem and add manualy librairie after ___link.ld, in this case library include
- rem throuth graphical build setting don't work, they may use {INPUT} from the
- rem standard commande
- rem ***************************************************************************
- echo **************************************************************************
- echo ***************************** *****************************
- echo ***************************** WARNING *****************************
- echo ***************************** *****************************
- echo **************************************************************************
- echo Generate script file for the linker to go throuth linker command line too
- echo long trouble under windows (32 000 char max)
- echo
- echo List only existing obj file.
- echo The best way is to use manual lunch with one .bat file per build.
- echo follow information in r e m above to use it.
- echo
- echo Run this commande evry time that obj liste is modified.
- echo WARNING this function don't delete obj file for file recently exclude
- echo frome build.
- echo To secure the compilation need a clean to suppress all obj, run a first
- echo build witch compile all file without error (with only linker error) to
- echo generate an obj file listing up to date and run a second buid for a
- echo successful linker step. When the OJB file listing is up to date, only
- echo eclipse build commande is needed
- echo **************************************************************************
- echo Linker file use : %1
- echo Build path use : %2
- echo **************************************************************************
- setlocal ENABLEDELAYEDEXPANSION
- set destination=%2
- set destination=%destination:/=%
- rem *** Generate obj file listing ***
- echo INPUT(>%destination%___link.ld
- dir %destination%*.o /s /b >>%destination%___link.ld
- echo )>>%destination%___link.ld
- rem *** Concatenat obj file listing with ld file from parameter 1 ***
- set str=%1
- set str=%str:/=%
- type %str%>>%destination%___link.ld
- echo *** OBJ file listing up to date
- echo **************************************************************************
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement