Skip to content

Commit 790259f

Browse files
committed
Remove remaining shlr/sdb leftovers
1 parent fc9b298 commit 790259f

File tree

12 files changed

+34
-51
lines changed

12 files changed

+34
-51
lines changed

binr/radare2/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ MACSDK=macosx10.10
1313
ENTITL=radare2.xcent
1414
#ENTITL=radare2_ios.xml
1515

16-
CFLAGS_INCLUDES+=-I$(SHLR)/sdb/src
16+
include ../../shlr/sdb.mk
17+
CFLAGS_INCLUDES+=$(SDB_CFLAGS)
1718
CFLAGS_INCLUDES+=-I$(LIBR)/include
1819

1920
ifeq (${COMPILER},emscripten)
@@ -94,6 +95,5 @@ include ../../shlr/bochs/deps.mk
9495
include ../../shlr/grub/deps.mk
9596
include ../../shlr/qnx/deps.mk
9697
include ../../shlr/ar/deps.mk
97-
include ../../shlr/sdb.mk
9898

9999
LDFLAGS+=$(LINK)

binr/rules.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ LINK+=$(LIBR)/crypto/libr_crypto.a
6565
LINK+=$(LIBR)/main/libr_main.a
6666
else ifeq (${COMPILER},wasm)
6767
LINK+=$(SHLR)/libr_shlr.a
68-
LINK+=$(SHLR)/sdb/src/libsdb.a
68+
LINK+=$(SHLR)/../subprojects/sdb/src/libsdb.a
6969
include $(SHLR)/capstone.mk
7070
EXT_EXE=.wasm
7171
else ifeq (${COMPILER},emscripten)
7272
LINK+=$(SHLR)/libr_shlr.a
73-
LINK+=$(SHLR)/sdb/src/libsdb.a
73+
LINK+=$(SHLR)/../subprojects/sdb/src/libsdb.a
7474
include $(SHLR)/capstone.mk
7575
CFLAGS+= -s SIDE_MODULE=1
7676
#CFLAGS+=-s ERROR_ON_UNDEFINED_SYMBOLS=0

doc/emscripten.md

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,15 @@
1-
Building for the browser
2-
========================
1+
# Building for the browser
32

4-
# Install emscripten:
3+
## Install emscripten:
54

6-
git clone git://github.com/kripken/emscripten.git
7-
export PATH=/path/to/emscripten:$PATH
8-
make clean
5+
```bash
6+
$ git clone git://github.com/kripken/emscripten.git
7+
$ export PATH=/path/to/emscripten:$PATH
8+
$ make clean
9+
```
910

11+
## Build radare
1012

11-
# Build radare
12-
13-
sys/emscripten.sh
14-
15-
16-
<!--
17-
18-
--- random notes ---
19-
20-
export CC="emcc --ignore-dynamic-linking"
21-
./configure --prefix=/usr --disable-shared --enable-static --disable-debugger --with-compiler=emscripten --without-pic --with-nonpic
22-
emmake make -j4
23-
24-
cd binr/radare2
25-
emcc ../../libr/*/*.o radare2.c -I ../../libr/include/ -DR2_BIRTH=\"pop\" -DR2_GITTIP=\"123\" ../../libr/db/sdb/src/*.o
26-
27-
binr/rax2/rax2.js:
28-
29-
emcc -O2 rax2.o ../../libr/util/libr_util.a -o rax2.js
30-
31-
binr/rasm2/rasm2.js:
32-
33-
emcc -O2 -L.. -o rasm2.js ../../shlr/sdb/src/libsdb.a ../../libr/fs/p/grub/libgrubfs.a -lm $A/util/libr_util.a $A/asm/libr_asm.a rasm2.o ../../libr/util/libr_util.a ../../libr/parse/libr_parse.a ../../libr/db/libr_db.a ../../libr/syscall/libr_syscall.a ../../libr/asm/libr_asm.a ../../libr/lib/libr_lib.a ../../libr/db/libr_db.a ../../shlr/sdb/src/libsdb.a ../../libr/util/libr_util.a
34-
35-
-->
13+
```bash
14+
$ sys/emscripten.sh
15+
```

doc/license.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ should be copied to `./plugins.cfg` before calling `./configure-plugins` to take
8282
### Less restrictive than LGPL
8383

8484
* libr/bin/mangling/cxx: GPLv2 or later, with linking exception
85+
* subprojects/sdb: MIT
8586
* shlr/capstone: BSD + LLVM
8687
* shlr/zip/zip: BSD
8788
* shlr/zip/zlib: BSD
8889
* shlr/java: Apache2.0
89-
* shlr/sdb: MIT
9090
* shlr/qnx: GPL (will be moved to extras soon)
9191
* shlr/grub: GPL (used by some fs plugins)
9292
* shlr/lz4: simplified BSD license

libr/bin/p/mach064.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ TARGET_MACH064=bin_mach064.${EXT_SO}
88
ALL_TARGETS+=${TARGET_MACH064}
99

1010
${TARGET_MACH064}: ${OBJ_MACH064}
11-
-${CC} $(call libname,bin_mach064) -shared ${CFLAGS} -o ${TARGET_MACH064}\
12-
${OBJ_MACH064} $(LINK) $(LDFLAGS) $(SHLR)/sdb/src/libsdb.a
11+
-${CC} $(call libname,bin_mach064) \
12+
-shared ${CFLAGS} -o ${TARGET_MACH064} \
13+
${OBJ_MACH064} $(LINK) $(LDFLAGS)

libr/core/p/sixref.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ALL_TARGETS+=${CORE_TARGET_SIXREF}
99
${CORE_TARGET_SIXREF}: ${CORE_OBJ_SIXREF}
1010
${CC} $(call libname,core_anal) ${CFLAGS} \
1111
-o core_sixref.${EXT_SO} \
12-
$(SHLR)/sdb/src/libsdb.a \
12+
$(SHLR)/../subprojects/sdb/src/libsdb.a \
1313
-L$(LIBR)/crypto -lr_crypto \
1414
${CORE_OBJ_SIXREF}
1515
endif

libr/fs/d/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include ../../../global.mk
22

33
# this bin should be created by make -C shlr/Makefile sdb/sdb
4-
SDB=$(STOP)/sdb/sdb
4+
SDB=$(STOP)/../subprojects/sdb/sdb
55
DBS=dospart.sdb
66

77
all: $(DBS)

libr/util/str.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ R_API ut32 r_str_hash(const char *s) {
268268
}
269269

270270
R_API int r_str_delta(char *p, char a, char b) {
271-
char *_a = strchr (p, a);
272-
char *_b = strchr (p, b);
271+
const char *_a = strchr (p, a);
272+
const char *_b = strchr (p, b);
273273
return (!_a || !_b)? 0 : (_a - _b);
274274
}
275275

@@ -320,10 +320,9 @@ R_API int r_str_word_set0(char *str) {
320320
*p = '\0';
321321
// FIX: i++;
322322
continue;
323-
} else {
324-
quote = 1;
325-
memmove (p, p + 1, strlen (p + 1) + 1);
326323
}
324+
quote = 1;
325+
memmove (p, p + 1, strlen (p + 1) + 1);
327326
}
328327
if (quote) {
329328
continue;

shlr/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ sdb-host:
145145
@echo ">>>>>>>>"
146146
@echo
147147
$(MAKE) -C $(SDB_ROOT) clean ; rm -f $(SDB_ROOT)/src/*.o $(SDB_ROOT)/include/sdb/version.h
148-
$(MAKE) -C $(SDB_ROOT)/src "CC=${HOST_CC}" LDFLAGS='${HOST_LDFLAGS}' CPPFLAGS='-I$(SHLR)/sdb/include' CFLAGS='${HOST_CFLAGS} ${PIC}' bin
148+
$(MAKE) -C $(SDB_ROOT)/src "CC=${HOST_CC}" LDFLAGS='${HOST_LDFLAGS}' CPPFLAGS='-I$(SDB_ROOT)/include' CFLAGS='${HOST_CFLAGS} ${PIC}' bin
149149
cp -f $(SDB_ROOT)/src/sdb${BUILD_EXT_EXE} $(SDB_ROOT)/src/.sdb${BUILD_EXT_EXE}
150150
cp -f $(SDB_ROOT)/src/sdb${BUILD_EXT_EXE} $(SDB_ROOT)/sdb$(BUILD_EXT_EXE)
151151
rm -f $(SDB_LIBA)
@@ -161,11 +161,11 @@ sdb-target:
161161
$(MAKE) -C $(SDB_ROOT) clean ; rm -f $(SDB_ROOT)/src/*.o ../include/sdb/version.h
162162
$(MAKE) -C $(SDB_ROOT)/src ../include/sdb/version.h
163163
ifeq ($(EXT_EXE),.wasm)
164-
$(MAKE) -C $(SDB_ROOT)/src ARCH=xxx EXT_AR=.$(EXT_AR) RANLIB="${RANLIB}" CPPFLAGS=-I$(SHLR)/sdb/include \
164+
$(MAKE) -C $(SDB_ROOT)/src ARCH=xxx EXT_AR=.$(EXT_AR) RANLIB="${RANLIB}" CPPFLAGS=-I$(SDB_ROOT)/include \
165165
CFLAGS_SHARED="${CFLAGS_SHARED} -DHAVE_MMAN=0" \
166166
CC="${CC}" AR="${AR}" ARCH=undefined CFLAGS='${CFLAGS} -DHAVE_MMAN=0' LDFLAGS='${LDFLAGS}' libsdb.$(EXT_AR)
167167
else
168-
$(MAKE) -C $(SDB_ROOT)/src ARCH=xxx EXT_AR=.$(EXT_AR) RANLIB="${RANLIB}" CPPFLAGS="-I$(SHLR)/sdb/include -DHAVE_SYSTEM=0" \
168+
$(MAKE) -C $(SDB_ROOT)/src ARCH=xxx EXT_AR=.$(EXT_AR) RANLIB="${RANLIB}" CPPFLAGS="-I$(SDB_ROOT)/include -DHAVE_SYSTEM=0" \
169169
CFLAGS_SHARED="${CFLAGS_SHARED}" \
170170
CC="${CC}" AR="${AR}" ARCH=undefined LDFLAGS='${LDFLAGS}' libsdb.$(EXT_AR)
171171
endif

shlr/sdb.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# deprecate.. move into subprojects/sdb-deps.mk
2-
CFLAGS+=-I$(SHLR)/../subprojects/sdb/include
2+
SDB_ROOT=$(SHLR)/../subprojects/sdb
3+
SDB_CFLAGS+=-I$(SDB_ROOT)/include
4+
SDB_LDFLAGS+=$(SDB_ROOT)/lib/lib_sdb.a
5+
CFLAGS+=$(SDB_CFLAGS)

0 commit comments

Comments
 (0)