# 只用一个动态库时
prog :main.c
gcc -o $@ $^ -lzn -L./ -Wl,-rpath,./
test1.c 中的函数test1用到了libzn.so
test2.c 中的函数test2用到了libzp.so
main.c 用到了test1.c中的test1函数和test2.c中的test2函数
# 使用两个动态库时,怎么写Makefile ?
prog : test1.c test2.c main.c
gcc -o $@ $^ -l??? -L./ -Wl,-rpath,./