From patchwork Fri Oct 31 15:30:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qais Yousef X-Patchwork-Id: 5205431 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 825B89F349 for ; Fri, 31 Oct 2014 15:31:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B34282012E for ; Fri, 31 Oct 2014 15:31:41 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 219F820125 for ; Fri, 31 Oct 2014 15:31:39 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8D06A2606DF; Fri, 31 Oct 2014 16:31:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 473162606CB; Fri, 31 Oct 2014 16:31:26 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 848732606CD; Fri, 31 Oct 2014 16:31:18 +0100 (CET) Received: from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by alsa0.perex.cz (Postfix) with ESMTP id 5C52F2606BA for ; Fri, 31 Oct 2014 16:31:10 +0100 (CET) Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id F38ED18A14428 for ; Fri, 31 Oct 2014 15:31:06 +0000 (GMT) Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 31 Oct 2014 15:31:09 +0000 Received: from qyousef-linux.le.imgtec.org (192.168.154.94) by LEMAIL01.le.imgtec.org (192.168.152.62) with Microsoft SMTP Server (TLS) id 14.3.210.2; Fri, 31 Oct 2014 15:31:08 +0000 From: Qais Yousef To: Date: Fri, 31 Oct 2014 15:30:56 +0000 Message-ID: <1414769456-4539-1-git-send-email-qais.yousef@imgtec.com> X-Mailer: git-send-email 2.1.0 MIME-Version: 1.0 X-Originating-IP: [192.168.154.94] Cc: Qais Yousef Subject: [alsa-devel] [PATCH TINYCOMPRESS] makefile.linux: allow env to override CROSS_COMPILE and CC X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP allow env variables to override them without having to modify the makefile. Signed-off-by: Qais Yousef --- makefile.linux | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/makefile.linux b/makefile.linux index 81782d0af461..c4dab6d3b7d5 100644 --- a/makefile.linux +++ b/makefile.linux @@ -9,8 +9,8 @@ LIBOBJ = ${LIBSRC:.c=.o} PLAYOBJ = ${PLAYSRC:.c=.o} RECOBJ = ${RECSRC:.c=.o} -CC = gcc -CROSS_COMPILE = +CROSS_COMPILE ?= +CC ?= ${CROSS_COMPILE}gcc CFLAGS += -std=c99 -Wall -Wextra -Wunused -DVERSION=\"${VER}\" -I./include LDFLAGS += -L. -ltinycompress @@ -20,19 +20,19 @@ all: libtinycompress cplay crec $(LIB): ${LIBOBJ} @echo " LD "$@ - @${CROSS_COMPILE}${CC} ${CFLAGS} -shared -Wl,-soname,$@.so -o $@.so ${LIBOBJ} ${LIBLDFLAGS} + @${CC} ${CFLAGS} -shared -Wl,-soname,$@.so -o $@.so ${LIBOBJ} ${LIBLDFLAGS} $(PLAYBIN): ${PLAYOBJ} ${LIB} @echo " LD "$@ - @${CROSS_COMPILE}${CC} ${CFLAGS} -o $@ ${PLAYOBJ} ${LDFLAGS} + @${CC} ${CFLAGS} -o $@ ${PLAYOBJ} ${LDFLAGS} $(RECBIN): ${RECOBJ} ${LIB} @echo " LD "$@ - @${CROSS_COMPILE}${CC} ${CFLAGS} -o $@ ${RECOBJ} ${LDFLAGS} + @${CC} ${CFLAGS} -o $@ ${RECOBJ} ${LDFLAGS} %.o: %.c @echo " CC "$< - @${CROSS_COMPILE}${CC} ${CFLAGS} -c -fPIC -o $@ $< + @${CC} ${CFLAGS} -c -fPIC -o $@ $< clean: @rm -rf ${BIN} ${PLAYOBJ} ${RECOBJ} ${LIB}.so ${LIBOBJ}