Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F114318
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/Makefile b/Makefile
index 94ecb19..cb2e93d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,32 +1,29 @@
# Apprentice binary
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
CPPFLAGS = -I$(ERL_EI_INCLUDE)
LDFLAGS = -L$(ERL_EI_LIB)
LDLIBS = -lpthread -lei -lm -lmagic
BEAM_FILES = _build/
PRIV = priv/
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
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Nov 26, 3:05 AM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40185
Default Alt Text
(1 KB)
Attached To
Mode
R20 majic
Attached
Detach File
Event Timeline
Log In to Comment