makefile changes

This commit is contained in:
Jordan Bracco 2020-05-13 20:46:45 +02:00
parent 5ca893aab4
commit 6c0a8d7034

View file

@ -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