Move yxml into shlr (#16799)

This commit is contained in:
Ishi Tatsuyuki 2020-05-12 18:58:10 +09:00 committed by GitHub
parent 9f2a98b314
commit 1390d1fc4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 44 additions and 5 deletions

View File

@ -88,7 +88,6 @@ r_bin_sources = [
'format/mach0/mach0.c',
'format/mach0/mach064.c',
'format/xnu/r_cf_dict.c',
'format/xnu/yxml.c',
'format/mdmp/mdmp.c',
'format/mdmp/mdmp_pe.c',
'format/mdmp/mdmp_pe64.c',
@ -131,7 +130,7 @@ r_bin_sources = [
'pdb/tpi.c'
]
r_bin_inc = [platform_inc, include_directories('mangling', 'format')]
r_bin_inc = [platform_inc, yxml_inc, include_directories('mangling', 'format')]
r_bin = library('r_bin', r_bin_sources,
include_directories: r_bin_inc,
@ -144,7 +143,8 @@ r_bin = library('r_bin', r_bin_sources,
r_socket_dep,
r_syscall_dep,
java_dep,
lz4_dep
lz4_dep,
yxml_dep
],
install: true,
implicit_include_directories: false,

View File

@ -1,7 +1,9 @@
OBJ_XNU_KERNELCACHE=bin_xnu_kernelcache.o
OBJ_XNU_KERNELCACHE+=../format/xnu/yxml.o
OBJ_XNU_KERNELCACHE+=../format/xnu/r_cf_dict.o
LINK+=$(STOP)/yxml/libyxml.a
CFLAGS+=-I$(STOP)/yxml/
STATIC_OBJ+=${OBJ_XNU_KERNELCACHE}
TARGET_XNU_KERNELCACHE=bin_xnu_kernelcache.${EXT_SO}

View File

@ -66,7 +66,7 @@ HOST_CC?=gcc
SHLR?=$(shell pwd)
AR?=ar
RANLIB?=ranlib
MODS=sdb zip java tcc mpc
MODS=sdb zip java tcc mpc yxml
MODS+=gdb qnx ar
# lz4
ifneq ($(CC),cccl)

View File

@ -714,3 +714,20 @@ mpc_dep = declare_dependency(
link_with: libmpc,
include_directories: mpc_inc
)
# handle yxml dependency
yxml_files = [
'yxml/yxml.c'
]
yxml_inc = [platform_inc, include_directories(['yxml'])]
libyxml = static_library('r2yxml', yxml_files,
include_directories: yxml_inc,
implicit_include_directories: false
)
yxml_dep = declare_dependency(
link_with: libyxml,
include_directories: yxml_inc
)

20
shlr/yxml/Makefile Normal file
View File

@ -0,0 +1,20 @@
include ../../libr/config.mk
include ../../mk/platform.mk
CFLAGS+=-I.
LIBMPC=libyxml.${EXT_AR}
OFILES=yxml.o
all: ${LIBMPC}
%.o: %.c
$(CC) $(CFLAGS) $(LDFLAGS) -c $< -o $@
${LIBMPC}: $(OFILES)
rm -f $(LIBMPC)
$(AR) q $(LIBMPC) $(OFILES)
$(RANLIB) $(LIBMPC)
clean:
rm -f $(OBJS) ${LIBMPC} $(OFILES)