Working emscripten build
This commit is contained in:
parent
7855f4952f
commit
cc5122e3bd
|
@ -1,4 +1,4 @@
|
|||
BIN=rasm2
|
||||
BINDEPS=r_cons r_flags r_db r_parse r_asm r_util r_lib r_syscall r_anal r_reg r_diff
|
||||
BINDEPS=r_cons r_flags r_parse r_asm r_lib r_syscall r_anal r_reg r_diff r_db r_util
|
||||
|
||||
include ../rules.mk
|
||||
|
|
|
@ -18,7 +18,8 @@ OBJ+=${BIN}.o
|
|||
BEXE=${BIN}${EXT_EXE}
|
||||
|
||||
ifeq ($(WITHNONPIC),1)
|
||||
LDFLAGS+=../../libr/libr.a
|
||||
## LDFLAGS+=$(addsuffix /lib${BINDEPS}.a,$(addprefix ../../libr/,$(subst r_,,$(BINDEPS))))
|
||||
LDFLAGS+=$(shell for a in ${BINDEPS} ; do b=`echo $$a |sed -e s,r_,,g`; echo ../../libr/$$b/lib$$a.a ; done )
|
||||
LDFLAGS+=../../shlr/sdb/src/libsdb.a
|
||||
LDFLAGS+=../../libr/fs/p/grub/libgrubfs.a
|
||||
ifneq (${OSTYPE},haiku)
|
||||
|
@ -39,7 +40,7 @@ ${BINS}: ${OBJS}
|
|||
ifneq ($(SILENT),)
|
||||
@echo CC $@
|
||||
endif
|
||||
${CC} ${CFLAGS} $@.c ${OBJS} ${LDFLAGS} -o $@
|
||||
${CC} ${CFLAGS} $@.c ${LDFLAGS} ${OBJS} -o $@
|
||||
|
||||
${BEXE}: ${OBJ} ${SHARED_OBJ}
|
||||
ifneq ($(SILENT),)
|
||||
|
@ -53,7 +54,7 @@ endif
|
|||
myclean:
|
||||
|
||||
clean:: myclean
|
||||
-rm -f ${OBJS} ${OBJ} ${BIN}
|
||||
-rm -f ${OBJS} ${OBJ} ${BEXE}
|
||||
|
||||
mrproper: clean
|
||||
-rm -f *.d
|
||||
|
|
|
@ -437,7 +437,10 @@ R_API void r_cons_newline() {
|
|||
}
|
||||
|
||||
R_API int r_cons_get_size(int *rows) {
|
||||
#if __UNIX__
|
||||
#if EMSCRIPTEN
|
||||
I.columns = 80;
|
||||
I.rows = 23;
|
||||
#elif __UNIX__
|
||||
struct winsize win;
|
||||
if (ioctl (1, TIOCGWINSZ, &win) == 0) {
|
||||
I.columns = win.ws_col;
|
||||
|
|
Loading…
Reference in New Issue