2020-05-13 22:40:39 +00:00
|
|
|
CFLAGS = -std=c99 -g -Wall -Werror
|
2020-07-09 14:21:08 +00:00
|
|
|
CPPFLAGS = -I$(ERL_EI_INCLUDE_DIR) -I/usr/local/include
|
|
|
|
LDFLAGS = -L$(ERL_EI_LIBDIR) -L/usr/local/lib
|
2020-05-13 22:40:39 +00:00
|
|
|
LDLIBS = -lpthread -lei -lm -lmagic
|
|
|
|
PRIV = priv/
|
|
|
|
RM = rm -Rf
|
2020-05-03 21:58:04 +00:00
|
|
|
|
2020-07-09 14:21:08 +00:00
|
|
|
ifeq ($(EI_INCOMPLETE),YES)
|
|
|
|
LDLIBS += -lerl_interface
|
|
|
|
CFLAGS += -DEI_INCOMPLETE
|
|
|
|
endif
|
|
|
|
|
2020-06-15 20:23:14 +00:00
|
|
|
all: priv/libmagic_port
|
2020-05-03 21:58:04 +00:00
|
|
|
|
2020-06-15 20:23:14 +00:00
|
|
|
priv/libmagic_port: src/libmagic_port.c
|
2020-05-13 22:40:39 +00:00
|
|
|
mkdir -p priv
|
2020-07-09 14:21:08 +00:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $< $(LDLIBS) -o $@
|
2020-05-03 21:58:04 +00:00
|
|
|
|
|
|
|
clean:
|
2020-06-14 16:39:46 +00:00
|
|
|
$(RM) $(PRIV)
|
2020-05-13 22:40:39 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|