From 6c0a8d70345a270791315184dd8b1af54c381f78 Mon Sep 17 00:00:00 2001 From: Jordan Bracco Date: Wed, 13 May 2020 20:46:45 +0200 Subject: [PATCH] makefile changes --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f9b1009..9eefbcf 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ # Apprentice binary -CC = gcc ERL_EI_INCLUDE:=$(shell erl -eval 'io:format("~s", [code:lib_dir(erl_interface, include)])' -s init stop -noshell | head -1) ERL_EI_LIB:=$(shell erl -eval 'io:format("~s", [code:lib_dir(erl_interface, lib)])' -s init stop -noshell | head -1) -CFLAGS = -std=c99 -g -Wall -Werror -I$(ERL_EI_INCLUDE) -LDLIBS = -L$(ERL_EI_LIB) -lpthread -lei -lm -lmagic +CFLAGS = -std=c99 -g -Wall -Werror +CPPFLAGS = -I$(ERL_EI_INCLUDE) +LDFLAGS = -L$(ERL_EI_LIB) +LDLIBS = -lpthread -lei -lm -lmagic BEAM_FILES = _build/ PRIV = priv/ RM = rm -Rf @@ -18,7 +19,7 @@ SOURCE_MAGIC = $(TEST_DIRECTORY)/elixir priv/apprentice: src/apprentice.c mkdir -p priv - $(CC) $(CFLAGS) $(LDLIBS) $^ -o $@ + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LDLIBS) $^ -o $@ # Test case