From cc7da2e459618a963d3d38ae380f36aca15d22a4 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Wed, 10 Jun 2009 11:16:11 +0200 Subject: [PATCH] Let the choice of the path to papihighlevel * Introduce 3 new variables: - LOCALDIR: base directory for looking after papihighlevel - PAPIHIGHLEVELINCDIR: include directory in $(LOCALDIR) - PAPIHIGHLEVELLIBDIR: library directory in $(LOCALDIR) --- communication_techniques/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/communication_techniques/Makefile b/communication_techniques/Makefile index 2b40d5d..9c5e942 100644 --- a/communication_techniques/Makefile +++ b/communication_techniques/Makefile @@ -4,12 +4,15 @@ BINDIR=bin SRCDIR=src INCDIR=include LIBDIR=lib +LOCALDIR=$(HOME)/local +PAPIHIGHLEVELLIBDIR=lib +PAPIHIGHLEVELINCDIR=include # Compilation flags # I know -finline-functions and -finline-functions-called-once are enabled by # -O3 but I did this in case gcc behaviour change one day CFLAGS=-g -O3 -finline-functions -finline-functions-called-once -Wall -Werror -LDFLAGS=-L$(LIBDIR) -L$(HOME)/local/lib -Wl,-rpath-link,$(HOME)/local/lib -lpthread -lpapihighlevel +LDFLAGS=-L$(LIBDIR) -L$(LOCALDIR)/$(PAPIHIGHLEVELLIBDIR) -Wl,-rpath-link,$(HOME)/local/lib -lpthread -lpapihighlevel # Executables CC=gcc @@ -42,7 +45,7 @@ $(LIBDIR)/lib$(BASE_TARGET).a: $(OBJDIR)/$(BASE_TARGET).o $(patsubst %,$(OBJDIR) # Compile common source files $(OBJDIR)/$(BASE_TARGET)_%.o: $(SRCDIR)/%.c symlink if [ ! -d $(OBJDIR) ] ; then mkdir $(OBJDIR) ; fi - $(CC) $(CFLAGS) -I$(INCDIR) -I$(HOME)/local/include -c $< -o $@ + $(CC) $(CFLAGS) -I$(INCDIR) -I$(LOCALDIR)/$(PAPIHIGHLEVELINCDIR) -c $< -o $@ endif # Compile non common source files