File: Makefile

package info (click to toggle)
libtree 3.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 288 kB
  • sloc: ansic: 1,412; makefile: 202
file content (23 lines) | stat: -rw-r--r-- 689 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Basic test of $ORIGIN interpolation in rpath & runpath.

.PHONY: clean

LD_LIBRARY_PATH=

all: check

liba.so: 
	echo 'int f(){return 1;}' | $(CC) -shared -Wl,-soname,$@ -o $@ -nostdlib -x c -

exe_rpath: liba.so
	echo 'int _start(){return f();}' | $(CC) -o $@ -Wl,--no-as-needed -Wl,--disable-new-dtags '-Wl,-rpath,$$ORIGIN' -Wno-implicit-function-declaration -nostdlib liba.so -x c -

exe_runpath: liba.so
	echo 'int _start(){return f();}' | $(CC) -o $@ -Wl,--no-as-needed -Wl,--enable-new-dtags '-Wl,-rpath,$$ORIGIN' -Wno-implicit-function-declaration -nostdlib liba.so -x c -

check: exe_rpath exe_runpath
	../../libtree exe_rpath
	../../libtree exe_runpath

clean:
	rm -f *.so exe*