aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile28
1 files changed, 15 insertions, 13 deletions
diff --git a/utils/Makefile b/utils/Makefile
index d591d15..96e815a 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -1,5 +1,5 @@
TOPDIR ?= ..
-SRCDIR ?= $(TOPDIR)
+SRCDIR ?= $(TOPDIR)/src
INCDIR ?= $(TOPDIR)/include
DESTDIR ?=
@@ -7,23 +7,24 @@ PREFIX ?= /usr/local
CROSS_COMPILE ?=
CC = $(CROSS_COMPILE)gcc
-CFLAGS ?= -Wall -Wextra -Werror -Wfatal-errors -I $(INCDIR)
-
-LD = $(CROSS_COMPILE)ld
-LDFLAGS ?=
+override CFLAGS := -Wall -Wextra -Werror -Wfatal-errors -I $(INCDIR) -L $(SRCDIR) -g -O2 $(CFLAGS)
VPATH = $(SRCDIR)
.PHONY: all
-all: tinyplay tinycap tinymix tinypcminfo
+all: -ltinyalsa tinyplay tinycap tinymix tinypcminfo
tinyplay: tinyplay.c -ltinyalsa
+ $(CC) $(CFLAGS) $< -o $@ -ltinyalsa
-tinycap: tinycap.c -ltinyalsa
+tinycap: tinycap.c
+ $(CC) $(CFLAGS) $< -o $@ -ltinyalsa
-tinymix: tinymix.c -ltinyalsa
+tinymix: tinymix.c
+ $(CC) $(CFLAGS) $< -o $@ -ltinyalsa
-tinypcminfo: tinypcminfo.c -ltinyalsa
+tinypcminfo: tinypcminfo.c
+ $(CC) $(CFLAGS) $< -o $@ -ltinyalsa
.PHONY: clean
clean:
@@ -33,8 +34,9 @@ clean:
.PHONY: install
install: tinyplay tinycap tinymix tinypcminfo
- cp -u tinyplay $(PREFIX)/bin/
- cp -u tinycap $(PREFIX)/bin/
- cp -u tinymix $(PREFIX)/bin/
- cp -u tinypcminfo $(PREFIX)/bin/
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ cp -u tinyplay $(DESTDIR)$(PREFIX)/bin/
+ cp -u tinycap $(DESTDIR)$(PREFIX)/bin/
+ cp -u tinymix $(DESTDIR)$(PREFIX)/bin/
+ cp -u tinypcminfo $(DESTDIR)$(PREFIX)/bin/