1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
tests/Makefile.am | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9d9b6bc..f345f46 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -11,38 +11,38 @@ simple_SOURCES = simple.c
main_scoped_SOURCES =
-main: main.o libfoo.so
- LD_LIBRARY_PATH=. gcc -Wl,--disable-new-dtags -o main main.o -L . -lfoo
+main: main.o libfoo.so libbar.so
+ $(CC) $(LDFLAGS) $(CFLAGS) -Wl,--disable-new-dtags -o main main.o -L . -lfoo -lbar
main-scoped: main.o libfoo-scoped.so
- LD_LIBRARY_PATH=. gcc -Wl,--enable-new-dtags -o main-scoped main.o -L . -lfoo-scoped
+ $(CC) $(LDFLAGS) $(CFLAGS) -Wl,--enable-new-dtags -o main-scoped main.o -L . -lfoo-scoped
main.o: main.c
- $(CC) -fpic -o main.o -c main.c
+ $(CC) $(CFLAGS) -fpic -o main.o -c main.c
libfoo.so: foo.o libbar.so
- NIX_DONT_SET_RPATH=1 $(CC) -Wl,--disable-new-dtags -shared -o libfoo.so foo.o -L . -lbar
+ NIX_DONT_SET_RPATH=1 $(CC) $(LDFLAGS) $(CFLAGS) -Wl,--disable-new-dtags -shared -o libfoo.so foo.o -L . -lbar
libfoo-scoped.so: foo.o libbar-scoped.so
- NIX_DONT_SET_RPATH=1 $(CC) -Wl,--enable-new-dtags -shared -o libfoo-scoped.so foo.o -L . -lbar-scoped
+ NIX_DONT_SET_RPATH=1 $(CC) $(LDFLAGS) $(CFLAGS) -Wl,--enable-new-dtags -shared -o libfoo-scoped.so foo.o -L . -lbar-scoped
foo.o: foo.c
- $(CC) -fpic -o foo.o -c foo.c
+ $(CC) $(CFLAGS) -fpic -o foo.o -c foo.c
libbar.so: bar.o
- NIX_DONT_SET_RPATH=1 $(CC) -Wl,--disable-new-dtags -shared -o libbar.so bar.o -L . -Wl,-rpath,`pwd`/no-such-path
+ NIX_DONT_SET_RPATH=1 $(CC) $(LDFLAGS) $(CFLAGS) -Wl,--disable-new-dtags -shared -o libbar.so bar.o -L . -Wl,-rpath,`pwd`/no-such-path
libbar-scoped.so: bar.o
- NIX_DONT_SET_RPATH=1 $(CC) -Wl,--enable-new-dtags -shared -o libbar-scoped.so bar.o
+ NIX_DONT_SET_RPATH=1 $(CC) $(LDFLAGS) $(CFLAGS) -Wl,--enable-new-dtags -shared -o libbar-scoped.so bar.o
bar.o: bar.c
- $(CC) -fpic -o bar.o -c bar.c
+ $(CC) $(CFLAGS) -fpic -o bar.o -c bar.c
big_dynstr_SOURCES = big-dynstr.c
big-dynstr: big-dynstr.o libfoo.so
- LD_LIBRARY_PATH=. gcc -Wl,--disable-new-dtags -o big-dynstr big-dynstr.o -L . -lfoo
+ $(CC) $(LDFLAGS) $(CFLAGS) -Wl,--disable-new-dtags -o big-dynstr big-dynstr.o -L . -lfoo
big-dynstr.c: main.c
cat main.c > big-dynstr.c
|