This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# BUILD library which contains all modules of the package | |
echo "Build package.o from module1.c and module2.c" | |
gcc -c -o module1.o module1.c | |
gcc -c -o module2.o module2.c | |
ld -o package.o -r module1.o module2.o | |
symbols=(`nm package.o`) | |
for((i=0;i<${#symbols[*]};i=i+1)) do | |
if [ "${symbols[$i]}" != "T" ]; then continue; fi |