Some static link fixes

This commit is contained in:
pancake 2014-03-24 23:43:30 +01:00
parent a34b3802f8
commit d784eca2a8
4 changed files with 21 additions and 1 deletions

View File

@ -13,6 +13,7 @@ LDFLAGS+=${DL_LIBS} -lm
endif
include ../../libr/socket/deps.mk
include ../../shlr/zip/deps.mk
include ../../shlr/gdb/deps.mk
clean::
rm -f $(BIN).$(EXT_SO)

View File

@ -5,6 +5,16 @@ CFLAGS=-I../../include -Wall -shared -fPIC ${LDFLAGS_LIB} ${LDFLAGS_LINKPATH}..
CFLAGS+=-DLIL_ENDIAN=1
CFLAGS+=-L../../util -lr_util -L../../reg -lr_reg -L.. -lr_core
CFLAGS+=-L../../db -lr_db -L../../cons -lr_cons -L../../bin -lr_bin
CFLAGS+=-L../../parse -lr_parse -L../../io -lr_io -L../../fs -lr_fs
CFLAGS+=-L../../magic -lr_magic -L../../hash -lr_hash -L../../config -lr_config
CFLAGS+=-L../../anal -lr_anal -L../../egg -lr_egg -L../../flags -lr_flags
CFLAGS+=-L../../syscall -lr_syscall -L../../socket -lr_socket -L../../search -lr_search
CFLAGS+=-L../../diff -lr_diff -L../../lang -lr_lang -L../../debug -lr_debug
CFLAGS+=-L../../bp -lr_bp -L../../reg -lr_reg -L../../asm -lr_asm
CFLAGS+=../../../shlr/sdb/src/libsdb.a
CFLAGS+=../../../shlr/capstone/libcapstone.a
CFLAGS+=../../../shlr/zip/librz.a
CFLAGS+=../../../shlr/gdb/lib/libgdbr.a
#CFLAGS+=-L../../anal -lr_anal -L../../core -lr_core
LDFLAGS+=${LINK}

View File

@ -5,7 +5,7 @@ CFLAGS+=-DCORELIB -Iarch/include -Iarch
SHLR=../../shlr/
include ../config.mk
CFLAGS+=-Ip/grub/include
CFLAGS+=-I$(SHLR)/grub/include
LDFLAGS+=$(SHLR)/grub/libgrubfs.a
EXTRA_TARGETS=plugins

View File

@ -391,14 +391,19 @@ R_API RFSFile *r_fs_slurp(RFS* fs, const char *path) {
// TODO: move into grubfs
#include "../../shlr/grub/include/grubfs.h"
RList *list = NULL;
#ifndef DISABLE_GRUB
static int parhook (struct grub_disk *disk, struct grub_partition *par, void *closure) {
RFSPartition *p = r_fs_partition_new (r_list_length (list), par->start*512, 512*par->len);
p->type = par->msdostype;
r_list_append (list, p);
return 0;
}
#endif
static RFSPartitionType partitions[] = {
#ifndef DISABLE_GRUB
#if 0
{ "msdos", &grub_msdos_partition_map },
{ "apple", &grub_apple_partition_map },
{ "sun", &grub_sun_partition_map },
@ -406,6 +411,8 @@ static RFSPartitionType partitions[] = {
{ "amiga", &grub_amiga_partition_map },
{ "bsdlabel", &grub_bsdlabel_partition_map },
{ "gpt", &grub_gpt_partition_map },
#endif
#endif
// XXX: In BURG all bsd partition map are in bsdlabel
//{ "openbsdlabel", &grub_openbsd_partition_map },
//{ "netbsdlabel", &grub_netbsd_partition_map },
@ -435,9 +442,11 @@ R_API RList *r_fs_partitions (RFS *fs, const char *ptype, ut64 delta) {
if (gpm) {
list = r_list_new ();
list->free = (RListFree)r_fs_partition_free;
#ifndef DISABLE_GRUB
grubfs_bind_io (NULL, 0);
struct grub_disk *disk = grubfs_disk (&fs->iob);
gpm->iterate (disk, parhook, 0);
#endif
return list;
}
if (ptype && *ptype)