Skip to content

Commit

Permalink
Fix #4056 - rename DEPS to R2DEPS ##build (#17020)
Browse files Browse the repository at this point in the history
* Rename DEPS to R2DEPS
* Cleanup of sys/build.sh
  • Loading branch information
Anton Kochkov committed Jun 12, 2020
1 parent fab89a6 commit ffe743e
Show file tree
Hide file tree
Showing 32 changed files with 60 additions and 57 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ supported.*
config.mk
plugins.cfg
langs.cfg
.test.c
.*.swp
.*.swo
*.un~
Expand Down
2 changes: 1 addition & 1 deletion libr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ $(LIBS):
pkgcfg:
@for lib in ${LIBS}; do $(MAKE) -C $${lib} pkgcfg; done
$(MAKE) -C asm pkgcfg NAME=libr DEPS="r_`echo ${LIBS}|sed -e 's, , r_,g'`"
$(MAKE) -C asm pkgcfg NAME=libr R2DEPS="r_`echo ${LIBS}|sed -e 's, , r_,g'`"
# TODO: Magically generate libr.pc.acr here using LIBS and so :)
install-pkgconfig:
Expand Down
2 changes: 1 addition & 1 deletion libr/anal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EXTRA_CLEAN=doclean
CFLAGS+=-I..

NAME=r_anal
DEPS=r_util r_reg r_syscall r_search r_cons r_flag r_hash r_crypto r_parse
R2DEPS=r_util r_reg r_syscall r_search r_cons r_flag r_hash r_crypto r_parse
CFLAGS+=-DR2_PLUGIN_INCORE -Iarch -I$(TOP)/shlr
CFLAGS+=-I$(LTOP)/asm/arch/include

Expand Down
4 changes: 2 additions & 2 deletions libr/asm/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include ../../global.mk

NAME=r_asm
DEPS=r_syscall r_lang r_util r_parse
DEPS+=r_flag r_cons r_reg
R2DEPS=r_syscall r_lang r_util r_parse
R2DEPS+=r_flag r_cons r_reg
CFLAGS+=-DR2_PLUGIN_INCORE -Iarch/include -Iarch -I../../shlr
CURDIR=p/

Expand Down
2 changes: 1 addition & 1 deletion libr/bin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include ../config.mk
include ../../global.mk

NAME=r_bin
DEPS=r_util r_io r_socket r_magic r_hash r_syscall
R2DEPS=r_util r_io r_socket r_magic r_hash r_syscall

.PHONY: pre

Expand Down
2 changes: 1 addition & 1 deletion libr/bp/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include ../config.mk

NAME=r_bp
DEPS+=r_util
R2DEPS+=r_util

CFLAGS+=-DR2_PLUGIN_INCORE

Expand Down
8 changes: 4 additions & 4 deletions libr/config.mk.tail
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ CFLAGS+=${CPPFLAGS}

ifeq (1,1)
#$(WITHPIC),1)
LINK+=$(subst r_,-L$(LIBR)/,$(DEPS))
LINK+=$(subst r_,-lr_,$(DEPS))
LINK+=$(subst r_,-L$(LIBR)/,$(R2DEPS))
LINK+=$(subst r_,-lr_,$(R2DEPS))
LINK+=$(subst r_,-L$(LIBR)/,$(BINDEPS))
LINK+=$(subst r_,-lr_,$(BINDEPS))
CFLAGS+=${PIC_CFLAGS}
LINK+=${PIC_CFLAGS}
else
ifneq ($(DEPS),)
LINK+=$(shell echo ${DEPS} | sed -e 's:r_\([^ ]\+\):$(LIBR)/\1/libr_\1.${EXT_AR}:g')
ifneq ($(R2DEPS),)
LINK+=$(shell echo ${R2DEPS} | sed -e 's:r_\([^ ]\+\):$(LIBR)/\1/libr_\1.${EXT_AR}:g')
endif
endif

Expand Down
2 changes: 1 addition & 1 deletion libr/config/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include ../config.mk

NAME=r_config
DEPS=r_util
R2DEPS=r_util
OBJS=config.o callback.o hold.o

include ../rules.mk
2 changes: 1 addition & 1 deletion libr/cons/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ NAME=r_cons
OBJS=cons.o pipe.o output.o grep.o less.o more.o pager.o cutf8.o
OBJS+=line.o hud.o rgb.o input.o pal.o editor.o 2048.o html.o
OBJS+=canvas.o canvas_line.o stiv.o
DEPS=r_util
R2DEPS=r_util

include ../rules.mk

Expand Down
6 changes: 3 additions & 3 deletions libr/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ include ../config.mk

NAME=r_core

DEPS=r_config r_cons r_io r_util r_flag r_asm
DEPS+=r_debug r_hash r_bin r_lang r_io r_anal r_parse r_bp r_egg
DEPS+=r_reg r_search r_syscall r_socket r_fs r_magic r_crypto
R2DEPS=r_config r_cons r_io r_util r_flag r_asm
R2DEPS+=r_debug r_hash r_bin r_lang r_io r_anal r_parse r_bp r_egg
R2DEPS+=r_reg r_search r_syscall r_socket r_fs r_magic r_crypto

OBJS=core.o cmd.o cfile.o cconfig.o visual.o cio.o yank.o libs.o agraph.o
OBJS+=fortune.o hack.o vasm.o patch.o cbin.o corelog.o rtr.o cmd_api.o
Expand Down
2 changes: 1 addition & 1 deletion libr/core/p/java.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LDFLAGS+=$(LINK)

ifeq ($(WITHPIC),1)
ALL_TARGETS+=${CORE_TARGET_JAVA}
DEPS+=r_crypto
R2DEPS+=r_crypto
include $(STOP)/java/deps.mk

${CORE_TARGET_JAVA}: ${CORE_OBJ_JAVA}
Expand Down
2 changes: 1 addition & 1 deletion libr/crypto/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME=r_crypto
DEPS=r_hash r_util
R2DEPS=r_hash r_util
CFLAGS+=-DR2_PLUGIN_INCORE

include ../config.mk
Expand Down
2 changes: 1 addition & 1 deletion libr/crypto/p/aes.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OBJ_AES=crypto_aes.o crypto_aes_algo.o

DEPS+=r_util
R2DEPS+=r_util
DEPFLAGS=-L../../util -lr_util -L.. -lr_crypto

STATIC_OBJ+=${OBJ_AES}
Expand Down
2 changes: 1 addition & 1 deletion libr/crypto/p/serpent.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OBJ_SERPENT=crypto_serpent.o crypto_serpent_algo.o

DEPS+=r_util
R2DEPS+=r_util
DEPFLAGS=-L../../util -lr_util -L.. -lr_crypto

STATIC_OBJ+=${OBJ_SERPENT}
Expand Down
4 changes: 2 additions & 2 deletions libr/debug/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include ../config.mk

NAME=r_debug
DEPS=r_reg r_anal r_bp r_io r_parse r_cons r_syscall r_hash r_flag r_util r_egg
DEPS+=r_socket
R2DEPS=r_reg r_anal r_bp r_io r_parse r_cons r_syscall r_hash r_flag r_util r_egg
R2DEPS+=r_socket
CFLAGS+=-DR2_PLUGIN_INCORE

ifeq ($(OSTYPE),bsd)
Expand Down
2 changes: 1 addition & 1 deletion libr/debug/p/bochs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ LDFLAGS+=-L$(LTOP)/reg -lr_reg
LDFLAGS+=-L$(LTOP)/bp -lr_bp
LDFLAGS+=-L$(LTOP)/io -lr_io

OBJ_BOCHS=debug_bochs.o
OBJ_BOCHS=debug_bochs.o

STATIC_OBJ+=${OBJ_BOCHS}
TARGET_BOCHS=debug_bochs.${EXT_SO}
Expand Down
2 changes: 1 addition & 1 deletion libr/debug/p/qnx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ LDFLAGS+=-L$(LTOP)/reg -lr_reg
LDFLAGS+=-L$(LTOP)/bp -lr_bp
LDFLAGS+=-L$(LTOP)/io -lr_io

OBJ_QNX=debug_qnx.o
OBJ_QNX=debug_qnx.o

STATIC_OBJ+=${OBJ_QNX}
TARGET_QNX=debug_qnx.${EXT_SO}
Expand Down
4 changes: 2 additions & 2 deletions libr/egg/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include ../config.mk

NAME=r_egg
DEPS=r_asm r_syscall r_util r_parse r_reg
DEPS+=r_flag r_cons
R2DEPS=r_asm r_syscall r_util r_parse r_reg
R2DEPS+=r_flag r_cons

OBJS=egg.o egg_lang.o
OBJS+=emit_x86.o
Expand Down
2 changes: 1 addition & 1 deletion libr/flag/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include ../config.mk

NAME=r_flag
DEPS=r_util
R2DEPS=r_util
OBJS=flag.o zones.o tags.o

include ../rules.mk
2 changes: 1 addition & 1 deletion libr/fs/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME=r_fs
DEPS=r_util r_io
R2DEPS=r_util r_io
CFLAGS+=-DR2_PLUGIN_INCORE -Iarch/include -Iarch

SHLR=../../shlr/
Expand Down
2 changes: 1 addition & 1 deletion libr/hash/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LINK=-lm
endif
endif

DEPS=r_util
R2DEPS=r_util
OBJS=state.o hash.o hamdist.o crca.o fletcher.o
OBJS+=entropy.o hcalc.o adler32.o luhn.o

Expand Down
6 changes: 3 additions & 3 deletions libr/io/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
include ../config.mk

NAME=r_io
DEPS+=r_util
DEPS+=r_socket
DEPS+=r_cons
R2DEPS+=r_util
R2DEPS+=r_socket
R2DEPS+=r_cons
STATIC_OBJS=$(subst ..,p/..,$(subst io_,p/io_,$(STATIC_OBJ)))
OBJS=${STATIC_OBJS}
OBJS+=io.o io_plugin.o io_map.o io_desc.o io_cache.o p_cache.o undo.o ioutils.o io_fd.o
Expand Down
2 changes: 1 addition & 1 deletion libr/lang/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include ../config.mk

NAME=r_lang
OBJS=lang.o
DEPS=r_util r_cons
R2DEPS=r_util r_cons

include ../rules.mk

Expand Down
2 changes: 1 addition & 1 deletion libr/magic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include ../../global.mk
include $(LTOP)/config.mk

NAME=r_magic
DEPS=r_util
R2DEPS=r_util
PCLIBS=@LIBMAGIC@
CFLAGS+=-I.
OBJS=apprentice.o ascmagic.o fsmagic.o funcs.o is_tar.o magic.o softmagic.o
Expand Down
6 changes: 3 additions & 3 deletions libr/main/deps.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
MAIN_LINK_ALL=1

ifeq ($(MAIN_LINK_ALL),1)
DEPS=r_config r_cons r_io r_util r_flag r_asm r_core
DEPS+=r_debug r_hash r_bin r_lang r_io r_anal r_parse r_bp r_egg
DEPS+=r_reg r_search r_syscall r_socket r_fs r_magic r_crypto
R2DEPS=r_config r_cons r_io r_util r_flag r_asm r_core
R2DEPS+=r_debug r_hash r_bin r_lang r_io r_anal r_parse r_bp r_egg
R2DEPS+=r_reg r_search r_syscall r_socket r_fs r_magic r_crypto
else
# only works
WITH_LIBS=0
Expand Down
4 changes: 2 additions & 2 deletions libr/parse/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
include ../config.mk

NAME=r_parse
DEPS=r_flag r_util r_syscall r_reg
R2DEPS=r_flag r_util r_syscall r_reg
# indirect dependencies
DEPS+=r_cons
R2DEPS+=r_cons

LINK+=$(STOP)/tcc/libr_tcc.a
CFLAGS+=-I$(STOP)/tcc/
Expand Down
2 changes: 1 addition & 1 deletion libr/reg/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include ../config.mk

NAME=r_reg
DEPS=r_util
R2DEPS=r_util
OBJS=reg.o arena.o rvalue.o rcond.o double.o profile.o

include ../rules.mk
4 changes: 2 additions & 2 deletions libr/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ pkgcfg:
@echo 'Name: ${NAME}' >> ../../pkgcfg/${NAME}.pc.acr
@echo 'Description: radare foundation libraries' >> ../../pkgcfg/${NAME}.pc.acr
@echo 'Version: @VERSION@' >> ../../pkgcfg/${NAME}.pc.acr
@echo 'Requires: $(filter r_%,${DEPS})' >> ../../pkgcfg/${NAME}.pc.acr
@echo 'Requires: $(filter r_%,${R2DEPS})' >> ../../pkgcfg/${NAME}.pc.acr
@if [ "${NAME}" = "libr" ]; then NAME=''; else NAME=${NAME}; fi ;\
echo 'Libs: -L$${libdir} -l${NAME} $(filter-out r_%,${DEPS}) ${PCLIBS}' >> ../../pkgcfg/${NAME}.pc.acr
echo 'Libs: -L$${libdir} -l${NAME} $(filter-out r_%,${R2DEPS}) ${PCLIBS}' >> ../../pkgcfg/${NAME}.pc.acr
@echo 'Cflags: -I$${includedir}/libr ${PCCFLAGS}' >> ../../pkgcfg/${NAME}.pc.acr

clean:: ${EXTRA_CLEAN}
Expand Down
2 changes: 1 addition & 1 deletion libr/search/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ NAME=r_search
OBJS=search.o bytepat.o strings.o aes-find.o privkey-find.o
OBJS+=regexp.o keyword.o
# OBJ+=rsakey.o
DEPS=r_util
R2DEPS=r_util
CFLAGS+=-g

include ../rules.mk
2 changes: 1 addition & 1 deletion libr/socket/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ OBJS+=socket_http_server.o
OBJS+=socket_rap_server.o
OBJS+=socket_rap_client.o
OBJS+=run.o r2pipe.o socket_serial.o
DEPS=r_util
R2DEPS=r_util

include deps.mk
include ../rules.mk
2 changes: 1 addition & 1 deletion libr/syscall/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include ../config.mk

NAME=r_syscall
DEPS=r_util
R2DEPS=r_util

OBJS=syscall.o ioports.o
CFLAGS+=-D__UNIX__ -Wall
Expand Down

0 comments on commit ffe743e

Please sign in to comment.