aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 758f736..d895384 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,9 @@ OBJECTS = mixer.o pcm.o
LIB = libtinyalsa.a
SHLIB = libtinyalsa.so
CROSS_COMPILE =
+PREFIX = /usr/local
+.PHONY: all
all: $(LIB) $(SHLIB) tinyplay tinycap tinymix tinypcminfo
tinyplay: $(SHLIB) tinyplay.o
@@ -29,6 +31,15 @@ $(LIB): $(OBJECTS)
%.o: %.c
$(CROSS_COMPILE)$(CC) $(CFLAGS) -fPIC -c $^ -I$(INC) -o $@
+.PHONY: clean
clean:
-rm $(LIB) $(SHLIB) $(OBJECTS) tinyplay.o tinyplay tinycap.o tinycap \
tinymix.o tinymix tinypcminfo.o tinypcminfo
+
+.PHONY: install
+install: $(LIB) $(SHLIB)
+ cp -u $(SHLIB) $(PREFIX)/lib/$(SHLIB)
+ cp -u $(LIB) $(PREFIX)/lib/$(LIB)
+ mkdir -p $(PREFIX)/include/tinyalsa
+ cp -u $(INC)/tinyalsa/asoundlib.h $(PREFIX)/include/tinyalsa/asoundlib.h
+