From 80325e9dfaece1316fa5cdc2b0551280369c4f7d Mon Sep 17 00:00:00 2001 From: Oxore Date: Thu, 6 Dec 2018 06:07:45 +0300 Subject: Wrap PREFIX with conditions in Makefile --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 41b61b6..02b129b 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,9 @@ SOURCES:=$(wildcard $(SRC)/*.c) OBJECTS:=$(SOURCES:$(SRC)/%.c=$(BUILD)/%.c.o) DEPENDS:=$(OBJECTS:.o=.d) +ifdef PREFIX INCLUDE+=$(PREFIX)/include +endif INCLUDE+=include INCLUDE+=$(MUNIT) INCLUDE:=$(INCLUDE:%=-I%) @@ -35,8 +37,10 @@ CFLAGS+=-g3 CFLAGS+=-O0 CFLAGS+=-MD +ifdef PREFIX LDFLAGS+=-L$(PREFIX)/lib LDFLAGS+=-Wl,-rpath=$(PREFIX)/lib +endif LDFLAGS+=$(COMMON) LDFLAGS_TETRIS+=$(LDFLAGS) -- cgit v1.2.3