aboutsummaryrefslogtreecommitdiffhomepage
path: root/development/ldso/samename/Makefile
blob: f35a1e31c4ed8a85fdde9fa2881c84aa1b33be09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
all:
	mkdir -p foo bar
	gcc -g -o foo/lib.so lib.c -shared -fPIC -DNAME=\"foo\"
	gcc -g -o bar/lib.so lib.c -shared -fPIC -DNAME=\"bar\"
	gcc -g -o main main.c -ldl
	./main foo/lib.so bar/lib.so
	LD_LIBRARY_PATH=foo:bar ./main lib.so lib.so
	LD_LIBRARY_PATH=bar:foo ./main lib.so lib.so
	LD_LIBRARY_PATH=foo ./main lib.so foo/lib.so
	LD_LIBRARY_PATH=foo ./main lib.so bar/lib.so

clean:
	$(RM) -r foo bar main