Fix #10300 - Link issues --with-sysmagic

This commit is contained in:
pancake 2018-06-11 03:36:45 +02:00
parent 90b71c017a
commit c52c7bace3
5 changed files with 10 additions and 5 deletions

View File

@ -73,6 +73,7 @@ LDFLAGS+=${DL_LIBS} -lm
endif
include ../../libr/socket/deps.mk
include ../../libr/magic/deps.mk
include ../../shlr/zip/deps.mk
include ../../shlr/gdb/deps.mk
include ../../shlr/java/deps.mk

View File

@ -17,6 +17,7 @@ include ${STATIC_BIN_XTR_PLUGINS}
include ${STATIC_BIN_LDR_PLUGINS}
include $(SHLR)/java/deps.mk
include $(SHLR)/ar/deps.mk
include $(LIBR)/magic/deps.mk
STATIC_OBJS=$(addprefix $(LTOP)/bin/p/, $(STATIC_OBJ))
OBJS=bin.o dbginfo.o bin_ldr.o bin_write.o demangle.o dwarf.o filter.o file.o obj.o open.o

View File

@ -5,11 +5,10 @@ NAME=r_magic
DEPS=r_util
PCLIBS=@LIBMAGIC@
CFLAGS+=-I.
ifeq (${USE_LIB_MAGIC},1)
LDFLAGS+=-lmagic
endif
OBJS=apprentice.o ascmagic.o fsmagic.o funcs.o is_tar.o magic.o softmagic.o
include deps.mk
include $(LTOP)/rules.mk
libfile.a:

4
libr/magic/deps.mk Normal file
View File

@ -0,0 +1,4 @@
ifeq (${USE_LIB_MAGIC},1)
LDFLAGS+=-lmagic
endif

View File

@ -39,14 +39,14 @@
#define MAXPATHLEN 255
#endif
R_LIB_VERSION (r_magic);
#if USE_LIB_MAGIC
#include <magic.h>
#define RMagic void
#undef R_API
#define R_API
R_LIB_VERSION (r_magic);
R_API RMagic* r_magic_new(int flags) {
return magic_open (flags);
}