You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
915 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. $CC = 'g++';
  3. $CC_FLAGS = '-std=c++11';
  4. $DEFINES[]='NDEBUG';
  5. $DEFINES[]='WEBRTC_ENABLE_SYMBOL_EXPORT';
  6. $DEFINES[]='WEBRTC_LIBRARY_IMPL';
  7. $INC[] = getcwd();
  8. $INC[] = '/usr/include';
  9. $INC[] = '/usr/loclal/include';
  10. $ListOfAllSources = `find -name "*.cc"`;
  11. $Lines = explode( "\n", $ListOfAllSources );
  12. $ODIR = '';
  13. $FP = 0;
  14. foreach( $Lines as $Line ){
  15. $CDIR = dirname ( $Line );
  16. $CName = basename( $Line );
  17. $TArr = explode( '/', trim( $Line ) );
  18. if( $CDIR!= $ODIR ){
  19. $ODIR = $CDIR;
  20. echo "Package: {$CDIR}\n";
  21. if( $FP == 3 ) exit();
  22. $FP++;
  23. };
  24. if( count( $DEFINES ) ){
  25. $ADEF = '-D' . implode( ' -D', $DEFINES );
  26. } else {
  27. $ADEF = '';
  28. };
  29. if( count( $INC ) ){
  30. $AINC = '-I' . implode( ' -I', $INC);
  31. } else {
  32. $AINC = '';
  33. };
  34. $CMD = "{$CC} {$CC_FLAGS} {$ADEF} {$AINC} {$Line} -c ";
  35. echo " " . $CMD . "\n";
  36. };
  37. ?>