Fix static build. Generate single libr.a

This commit is contained in:
pancake 2013-01-04 14:34:58 +01:00
parent 3635f85336
commit da837ad4ce
7 changed files with 25 additions and 10 deletions

View File

@ -11,6 +11,7 @@ OBJ+=${BIN}.o
BEXE=${BIN}${EXT_EXE}
ifeq ($(WITHNONPIC),1)
LDFLAGS+=../../libr/libr.a
LDFLAGS+=../../libr/db/sdb/src/libsdb.a
LDFLAGS+=../../libr/fs/p/grub/libgrubfs.a
LDFLAGS+=-lm

View File

@ -28,6 +28,19 @@ all:
${MAKE} $(LIBS5)
${MAKE} $(LIBS6)
${MAKE} $(LIBS7)
ifeq (${WITHNONPIC},1)
${MAKE} libr.a
endif
# looks hacky :D
libr.a: $(shell ls */libr_*.a)
rm -f libr.a
echo CREATE libr.a > libr.m
for a in */libr_*.a ; do echo ADDLIB $$a >> libr.m ; done
echo SAVE >> libr.m
# ar -M is a gnu-ism .. try to find a proper portable way to do that
ar -M < libr.m
rm -f libr.m
$(LIBS):
@echo "DIR $@"

View File

@ -1,3 +0,0 @@
all:
${CC} -o d -DVERSION=\"0.19.1\" test.c
${CC} -Wall -g -ggdb -o a -DMAIN_DIS -DVERSION=\"0.1\" i8080dis.c

View File

@ -120,7 +120,7 @@ static void arg(char* s, int const cmd, struct arg_t const* arg, int val) {
}
}
int i8080_disasm(unsigned char const* const code, char* text, int text_sz) {
static int i8080_disasm(unsigned char const* const code, char* text, int text_sz) {
int const cmd = code[0];
int const p = code[1] | (code[2] << 8);

View File

@ -6,6 +6,9 @@ SHARED_JAVA+=../../shlr/java/ops.o
SHARED2_JAVA=$(addprefix ../,${SHARED_JAVA})
STATIC_OBJ+=${OBJ_JAVA}
ifeq ($(WITHNONPIC),1)
STATIC_OBJ+=${SHARED2_JAVA}
endif
SHARED_OBJ+=${SHARED_JAVA}
TARGET_JAVA=bin_java.${EXT_SO}

View File

@ -72,11 +72,12 @@ if [ $STATIC_BUILD = 1 ]; then
CFGFLAGS="--without-pic --with-nonpic"
fi
# dup
echo ./configure --with-compiler=android --with-ostype=android \
--without-ewf --without-ssl --prefix=${PREFIX} ${CFGFLAGS}
echo ./configure --with-compiler=android \
--with-ostype=android --without-ewf \
--prefix=${PREFIX} ${CFGFLAGS}
./configure --with-compiler=android --with-ostype=android \
--without-ewf --without-ssl --prefix=${PREFIX} ${CFGFLAGS} || exit 1
--without-ewf --prefix=${PREFIX} ${CFGFLAGS} || exit 1
make -s -j 4 || exit 1
fi
rm -rf $D

View File

@ -44,9 +44,9 @@ if [ ! -d "${NDK}" ]; then
exit 1
fi
TOOLCHAIN_MIPS=`ls ${NDK}/toolchains/ |grep "^mips" |sort |tail -n 1`
TOOLCHAIN_ARM=`ls ${NDK}/toolchains/ |grep "^arm" |sort |tail -n 1`
TOOLCHAIN_X86=`ls ${NDK}/toolchains/ |grep "^x86" |sort |tail -n 1`
TOOLCHAIN_MIPS=`ls ${NDK}/toolchains/ |grep "^mips" |sort |head -n 1`
TOOLCHAIN_ARM=`ls ${NDK}/toolchains/ |grep "^arm" |sort |head -n 1`
TOOLCHAIN_X86=`ls ${NDK}/toolchains/ |grep "^x86" |sort |head -n 1`
NDKPATH_MIPS=${NDK}/toolchains/${TOOLCHAIN_MIPS}/prebuilt/${OS}-x86/bin/
NDKPATH_ARM=${NDK}/toolchains/${TOOLCHAIN_ARM}/prebuilt/${OS}-x86/bin/