aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Holberton <tay10r@protonmail.com>2020-02-27 07:14:15 -0500
committerGitHub <noreply@github.com>2020-02-27 07:14:15 -0500
commit38ece0842b86584af84dd70d33f11b0786b9a7be (patch)
tree1b083fbb8c526caa9c5f79e1ff8461484d28cb45
parent5389c1f796ea153232a582bd28e73be43638a124 (diff)
parent650c11ca17ee437a22aefe4fd256aba736a3c1c8 (diff)
Merge pull request #147 from brunosmmm/fix-cross-compilation
Fix cross-compilation
-rw-r--r--examples/Makefile6
-rw-r--r--utils/Makefile10
2 files changed, 10 insertions, 6 deletions
diff --git a/examples/Makefile b/examples/Makefile
index c52d367..650966d 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -11,9 +11,11 @@ EXAMPLES += pcm-writei
.PHONY: all
all: $(EXAMPLES)
-pcm-readi: pcm-readi.c -ltinyalsa -ldl
+pcm-readi pcm-writei: LDLIBS+=-ldl
-pcm-writei: pcm-writei.c -ltinyalsa -ldl
+pcm-readi: pcm-readi.c -ltinyalsa
+
+pcm-writei: pcm-writei.c -ltinyalsa
.PHONY: clean
clean:
diff --git a/utils/Makefile b/utils/Makefile
index de34f94..dc5fd64 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -19,19 +19,21 @@ VPATH = ../src:../include/tinyalsa
.PHONY: all
all: -ltinyalsa tinyplay tinycap tinymix tinypcminfo
-tinyplay: tinyplay.o libtinyalsa.a -ldl
+tinyplay tinycap tinypcminfo: LDLIBS+=-ldl
+
+tinyplay: tinyplay.o libtinyalsa.a
tinyplay.o: tinyplay.c pcm.h mixer.h asoundlib.h
-tinycap: tinycap.o libtinyalsa.a -ldl
+tinycap: tinycap.o libtinyalsa.a
tinycap.o: tinycap.c pcm.h mixer.h asoundlib.h
-tinymix: tinymix.o libtinyalsa.a -ldl
+tinymix: tinymix.o libtinyalsa.a
tinymix.o: tinymix.c pcm.h mixer.h asoundlib.h
-tinypcminfo: tinypcminfo.o libtinyalsa.a -ldl
+tinypcminfo: tinypcminfo.o libtinyalsa.a
tinypcminfo.o: tinypcminfo.c pcm.h mixer.h asoundlib.h