Compile test db

This commit is contained in:
Jordan Bracco 2020-06-03 16:19:25 +02:00
parent e6656ecee8
commit 69212838e4

View file

@ -13,20 +13,17 @@ RM = rm -Rf
# Unit test custom magic file
MAGIC = file
TEST_DIRECTORY = test
TARGET_MAGIC = $(TEST_DIRECTORY)/elixir.mgc
SOURCE_MAGIC = $(TEST_DIRECTORY)/elixir
all: priv/apprentice test/elixir.mgc
test/%.mgc: test/%
cd test; file -C -m ../$^
priv/apprentice: src/apprentice.c
mkdir -p priv
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
# Test case
$(TARGET_MAGIC): $(SOURCE_MAGIC)
cd $(TEST_DIRECTORY); $(MAGIC) -C -m elixir
clean:
$(RM) $(PRIV) $(BEAM_FILES)
$(RM) $(PRIV) $(BEAM_FILES) test/*.mgc
.PHONY: clean