File tree Expand file tree Collapse file tree 12 files changed +34
-51
lines changed Expand file tree Collapse file tree 12 files changed +34
-51
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ MACSDK=macosx10.10
13
13
ENTITL =radare2.xcent
14
14
# ENTITL=radare2_ios.xml
15
15
16
- CFLAGS_INCLUDES+ =-I$(SHLR ) /sdb/src
16
+ include ../../shlr/sdb.mk
17
+ CFLAGS_INCLUDES+ =$(SDB_CFLAGS )
17
18
CFLAGS_INCLUDES+ =-I$(LIBR ) /include
18
19
19
20
ifeq (${COMPILER},emscripten)
@@ -94,6 +95,5 @@ include ../../shlr/bochs/deps.mk
94
95
include ../../shlr/grub/deps.mk
95
96
include ../../shlr/qnx/deps.mk
96
97
include ../../shlr/ar/deps.mk
97
- include ../../shlr/sdb.mk
98
98
99
99
LDFLAGS+ =$(LINK )
Original file line number Diff line number Diff line change @@ -65,12 +65,12 @@ LINK+=$(LIBR)/crypto/libr_crypto.a
65
65
LINK+ =$(LIBR ) /main/libr_main.a
66
66
else ifeq (${COMPILER},wasm)
67
67
LINK+ =$(SHLR ) /libr_shlr.a
68
- LINK+ =$(SHLR ) /sdb/src/libsdb.a
68
+ LINK+ =$(SHLR ) /../subprojects/ sdb/src/libsdb.a
69
69
include $(SHLR ) /capstone.mk
70
70
EXT_EXE =.wasm
71
71
else ifeq (${COMPILER},emscripten)
72
72
LINK+ =$(SHLR ) /libr_shlr.a
73
- LINK+ =$(SHLR ) /sdb/src/libsdb.a
73
+ LINK+ =$(SHLR ) /../subprojects/ sdb/src/libsdb.a
74
74
include $(SHLR ) /capstone.mk
75
75
CFLAGS+ = -s SIDE_MODULE=1
76
76
# CFLAGS+=-s ERROR_ON_UNDEFINED_SYMBOLS=0
Original file line number Diff line number Diff line change 1
- Building for the browser
2
- ========================
1
+ # Building for the browser
3
2
4
- # Install emscripten:
3
+ ## Install emscripten:
5
4
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
+ ```
9
10
11
+ ## Build radare
10
12
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
+ ```
Original file line number Diff line number Diff line change @@ -82,11 +82,11 @@ should be copied to `./plugins.cfg` before calling `./configure-plugins` to take
82
82
### Less restrictive than LGPL
83
83
84
84
* libr/bin/mangling/cxx: GPLv2 or later, with linking exception
85
+ * subprojects/sdb: MIT
85
86
* shlr/capstone: BSD + LLVM
86
87
* shlr/zip/zip: BSD
87
88
* shlr/zip/zlib: BSD
88
89
* shlr/java: Apache2.0
89
- * shlr/sdb: MIT
90
90
* shlr/qnx: GPL (will be moved to extras soon)
91
91
* shlr/grub: GPL (used by some fs plugins)
92
92
* shlr/lz4: simplified BSD license
Original file line number Diff line number Diff line change @@ -8,5 +8,6 @@ TARGET_MACH064=bin_mach064.${EXT_SO}
8
8
ALL_TARGETS+ =${TARGET_MACH064}
9
9
10
10
${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 )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ ALL_TARGETS+=${CORE_TARGET_SIXREF}
9
9
${CORE_TARGET_SIXREF} : ${CORE_OBJ_SIXREF}
10
10
${CC} $(call libname,core_anal) ${CFLAGS} \
11
11
-o core_sixref.${EXT_SO} \
12
- $(SHLR ) /sdb/src/libsdb.a \
12
+ $(SHLR ) /../subprojects/ sdb/src/libsdb.a \
13
13
-L$(LIBR ) /crypto -lr_crypto \
14
14
${CORE_OBJ_SIXREF}
15
15
endif
Original file line number Diff line number Diff line change 1
1
include ../../../global.mk
2
2
3
3
# this bin should be created by make -C shlr/Makefile sdb/sdb
4
- SDB =$(STOP ) /sdb/sdb
4
+ SDB =$(STOP ) /../subprojects/ sdb/sdb
5
5
DBS =dospart.sdb
6
6
7
7
all : $(DBS )
Original file line number Diff line number Diff line change @@ -268,8 +268,8 @@ R_API ut32 r_str_hash(const char *s) {
268
268
}
269
269
270
270
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 );
273
273
return (!_a || !_b )? 0 : (_a - _b );
274
274
}
275
275
@@ -320,10 +320,9 @@ R_API int r_str_word_set0(char *str) {
320
320
* p = '\0' ;
321
321
// FIX: i++;
322
322
continue ;
323
- } else {
324
- quote = 1 ;
325
- memmove (p , p + 1 , strlen (p + 1 ) + 1 );
326
323
}
324
+ quote = 1 ;
325
+ memmove (p , p + 1 , strlen (p + 1 ) + 1 );
327
326
}
328
327
if (quote ) {
329
328
continue ;
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ sdb-host:
145
145
@echo " >>>>>>>>"
146
146
@echo
147
147
$(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
149
149
cp -f $(SDB_ROOT ) /src/sdb${BUILD_EXT_EXE} $(SDB_ROOT ) /src/.sdb${BUILD_EXT_EXE}
150
150
cp -f $(SDB_ROOT ) /src/sdb${BUILD_EXT_EXE} $(SDB_ROOT ) /sdb$(BUILD_EXT_EXE )
151
151
rm -f $(SDB_LIBA )
@@ -161,11 +161,11 @@ sdb-target:
161
161
$(MAKE ) -C $(SDB_ROOT ) clean ; rm -f $(SDB_ROOT ) /src/* .o ../include/sdb/version.h
162
162
$(MAKE ) -C $(SDB_ROOT ) /src ../include/sdb/version.h
163
163
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 \
165
165
CFLAGS_SHARED="${CFLAGS_SHARED} -DHAVE_MMAN=0" \
166
166
CC="${CC}" AR="${AR}" ARCH=undefined CFLAGS='${CFLAGS} -DHAVE_MMAN=0' LDFLAGS='${LDFLAGS}' libsdb.$(EXT_AR)
167
167
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" \
169
169
CFLAGS_SHARED="${CFLAGS_SHARED}" \
170
170
CC="${CC}" AR="${AR}" ARCH=undefined LDFLAGS='${LDFLAGS}' libsdb.$(EXT_AR)
171
171
endif
Original file line number Diff line number Diff line change 1
1
# 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 )
You can’t perform that action at this time.
0 commit comments