diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 50 |
1 files changed, 26 insertions, 24 deletions
@@ -1,29 +1,31 @@ -CFLAGS = -c -fPIC -Wall -INC = include -OBJECTS = mixer.o pcm.o -LIB = libtinyalsa.so -CROSS_COMPILE = +export DESTDIR ?= +export PREFIX ?= /usr/local +export CROSS_COMPILE = -all: $(LIB) tinyplay tinycap tinymix tinypcminfo +export INCDIR ?= $(PREFIX)/include +export LIBDIR ?= $(PREFIX)/lib +export BINDIR ?= $(PREFIX)/bin +export MANDIR ?= $(PREFIX)/share/man -tinyplay: $(LIB) tinyplay.o - $(CROSS_COMPILE)gcc tinyplay.o -L. -ltinyalsa -o tinyplay +INCDIR ?= $(PREFIX)/include -tinycap: $(LIB) tinycap.o - $(CROSS_COMPILE)gcc tinycap.o -L. -ltinyalsa -o tinycap - -tinymix: $(LIB) tinymix.o - $(CROSS_COMPILE)gcc tinymix.o -L. -ltinyalsa -o tinymix - -tinypcminfo: $(LIB) tinypcminfo.o - $(CROSS_COMPILE)gcc tinypcminfo.o -L. -ltinyalsa -o tinypcminfo - -$(LIB): $(OBJECTS) - $(CROSS_COMPILE)gcc -shared $(OBJECTS) -o $(LIB) - -.c.o: - $(CROSS_COMPILE)gcc $(CFLAGS) $< -I$(INC) +.PHONY: all +all: + $(MAKE) -C src + $(MAKE) -C utils + $(MAKE) -C doxygen +.PHONY: clean clean: - -rm $(LIB) $(OBJECTS) tinyplay.o tinyplay tinycap.o tinycap \ - tinymix.o tinymix tinypcminfo.o tinypcminfo + $(MAKE) -C src clean + $(MAKE) -C utils clean + $(MAKE) -C doxygen clean + +.PHONY: install +install: + mkdir -p $(DESTDIR)$(INCDIR)/tinyalsa + cp -Ru include/tinyalsa $(DESTDIR)$(INCDIR)/ + $(MAKE) -C src install + $(MAKE) -C utils install + $(MAKE) -C doxygen install + |