From 281af8a08f7938abcff5734a86cfcb5d3ee65b40 Mon Sep 17 00:00:00 2001 From: Taylor Holberton Date: Sat, 1 Oct 2016 22:33:05 -0400 Subject: added install to multiarch dir and override CFLAGS mechanism --- src/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 1549650..50a692f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,15 +1,14 @@ TOPDIR ?= .. -SRCDIR ?= $(TOPDIR)/src INCDIR ?= $(TOPDIR)/include +DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + DESTDIR ?= PREFIX ?= /usr/local CROSS_COMPILE = CC = $(CROSS_COMPILE)gcc -CFLAGS = -Wall -Wextra -Werror -Wfatal-errors -CFLAGS += -I $(INCDIR) -CFLAGS += -fPIC +override CFLAGS := -Wall -Wextra -Werror -Wfatal-errors -I $(INCDIR) -fPIC $(CFLAGS) AR = $(CROSS_COMPILE)ar ARFLAGS = rcs @@ -40,6 +39,7 @@ clean: .PHONY: install install: libtinyalsa.a libtinyalsa.so - cp -u libtinyalsa.a $(DESTDIR)$(PREFIX)/lib/ - cp -u libtinyalsa.so $(DESTDIR)$(PREFIX)/lib/ + mkdir -p $(DESTDIR)$(PREFIX)/lib/$(DEB_HOST_MULTIARCH) + cp -u libtinyalsa.a $(DESTDIR)$(PREFIX)/lib/$(DEB_HOST_MULTIARCH) + cp -u libtinyalsa.so $(DESTDIR)$(PREFIX)/lib/$(DEB_HOST_MULTIARCH) -- cgit v1.2.3