User:Feixie/StaticSharedLib

main.exe : main.C libcalc.so libpointer.so g++ -I`pwd` -L`pwd` -lcalc -lpointer main.C -o main.exe
 * Makefile

libpointer.so : Pointer.o g++ -shared -Wl,-soname,libpointer.so -o libpointer.so.1 Pointer.o  ln -s libpointer.so.1 libpointer.so

Pointer.o : Pointer.H Pointer.C g++ -fPIC -c -g -Wall -I `pwd` Pointer.H Pointer.C

libcalc.so : calc.o g++ -shared -Wl,-soname,libcalc.so -o libcalc.so.1 calc.o  ln -s libcalc.so.1 libcalc.so

calc.o : calc.H calc.C g++ -fPIC -c -g -Wall calc.H calc.C

clean : rm *.so.* *.o *.exe *.so -f


 * Run: LD_LIBRARY_PATH=./ ./main.exe