Simplify and fix build for shlr/bochs

This commit is contained in:
pancake 2016-03-25 00:41:13 +01:00
parent 32857e5fcd
commit b24ae8d05e
3 changed files with 10 additions and 27 deletions

View File

@ -29,7 +29,7 @@ CS_REV=
CS_PATCHES=1
endif
.PHONY: capstone-sync capstone-build all clean mrproper libgdbr libwind
.PHONY: capstone-sync capstone-build all clean mrproper libgdbr libwind bochs
HOST_CC?=gcc
SHLR?=$(shell pwd)
@ -53,14 +53,14 @@ all:
exit 1
endif
preall: targets libwind capstone-build
preall: targets libwind capstone-build bochs
@for MOD in ${MODS} ; do \
echo $(MAKE) -C $$MOD ; \
$(MAKE) -C $$MOD HAVE_VALA= ROOT="${PWD}/../" CC="${CC}" ; \
done
SDBFILES=sdb/src/.sdb${EXT_EXE} sdb/sdb${EXT_EXE} sdb/src/.sdb sdb/sdb
PREMODS=capstone gdb wind sdb
PREMODS=capstone gdb wind sdb bochs
clean mrproper:
rm -f ${SDBFILES}
@ -127,10 +127,13 @@ SYNCFILES=$(addprefix sdb.vc/,${F})
I=../libr/include
libgdbr:
cd gdb ; $(MAKE) all
$(MAKE) -C gdb all
libwind:
cd wind ; $(MAKE) all
$(MAKE) -C wind all
bochs:
$(MAKE) -C bochs all
sdb-clean clean-sdb:
$(MAKE) -C sdb clean

View File

@ -23,37 +23,17 @@ SRC_C=$(wildcard $(SRC_D)/*.c)
SRC_O=$(SRC_C:.c=.o)
all: $(LIB)/$(LIBNAME).a
# make
default: make
prepare:
mkdir -p $(LIB)
#$(LD) -shared -Wl,-soname,$(LIBNAME).so -o $(LIB)/$(LIBNAME).so $(SRC_O)
$(LIB):
mkdir -p $(LIB)
$(LIB)/$(LIBNAME).a: $(LIB) $(SRC_O)
mkdir -p $(LIB)
$(LD) $(PIC_CFLAGS) -shared -o $(LIB)/$(LIBFILE) $(CFLAGS) $(SRC_O) $(LDFLAGS) $(LINK)
$(AR) rvs $(LIB)/$(LIBNAME).a $(SRC_O)
# required for solaris and w32
$(RANLIB) $(LIB)/$(LIBNAME).a
clean:
-rm -f $(SRC_O)
-rm -rf lib
unit: lib
$(CC) $(CFLAGS) $(TEST_INCLUDES) -c $(UNIT_TEST) -o $(TEST_D)/unit.o
$(LD) $(TEST_D)/unit.o -o $(TEST_D)/unit -L$(LIB) -lgdbr -lglib-2.0
run_unit: unit
LD_LIBRARY_PATH=./lib ./test/unit
valgrind_test: client
rarun2 libpath=./lib system="valgrind --track-origins=yes -v --leak-check=full ./test/client"
edit:
$(EDITOR) -c "args **/*.h **/*.c"

View File

@ -113,7 +113,7 @@ void bochs_send_cmd(libbochs_t* b, const char * comando, bool bWait) {
if (bWait)
WaitForReply_(b);
#else
#warning TODO
#warning TODO bochs_send_cmd not implemented for this platform
#endif
}