2013-06-04 23:13:05 +00:00
|
|
|
include ../config-user.mk
|
2013-08-27 00:00:21 +00:00
|
|
|
include ../mk/${COMPILER}.mk
|
2013-06-04 23:13:05 +00:00
|
|
|
|
2013-08-26 22:52:04 +00:00
|
|
|
HOST_CC?=gcc
|
2013-12-20 03:32:38 +00:00
|
|
|
MODS=sdb udis86 java tcc zip grub
|
2013-04-30 23:29:06 +00:00
|
|
|
URL=git://github.com/radare/sdb
|
2013-05-13 23:53:52 +00:00
|
|
|
PWD=$(shell pwd)
|
|
|
|
SDB_CONFIG=${PWD}/sdb-config.mk
|
2013-04-30 23:29:06 +00:00
|
|
|
|
2013-08-26 22:52:04 +00:00
|
|
|
all: sdb/sdb
|
2013-05-13 23:53:52 +00:00
|
|
|
@for a in ${MODS} ; do \
|
2013-08-26 23:18:42 +00:00
|
|
|
echo ${MAKE} -C $$a ; \
|
2013-11-14 12:57:01 +00:00
|
|
|
${MAKE} -C $$a HAVE_VALA= ROOT=${PWD}/../ CC="${CC}" ; \
|
2013-05-13 23:53:52 +00:00
|
|
|
done
|
2012-09-02 23:27:52 +00:00
|
|
|
|
2012-08-10 09:35:38 +00:00
|
|
|
clean mrproper:
|
2013-09-13 22:45:49 +00:00
|
|
|
rm -f sdb/src/.sdb sdb/sdb
|
2013-08-26 23:36:55 +00:00
|
|
|
cd sdb ; ${MAKE} clean
|
2013-04-30 23:29:06 +00:00
|
|
|
@for a in ${MODS} ; do ${MAKE} -C $$a clean ; done
|
|
|
|
|
2013-08-26 23:32:51 +00:00
|
|
|
$(SDBLIB) sdb/sdb:
|
2013-08-26 22:52:04 +00:00
|
|
|
cd sdb ; ${MAKE} src/sdb-version.h
|
2013-09-06 22:39:08 +00:00
|
|
|
cd sdb ; ${MAKE} clean
|
2013-08-26 22:52:04 +00:00
|
|
|
cd sdb ; \
|
|
|
|
${MAKE} clean && \
|
2013-12-20 00:20:17 +00:00
|
|
|
${MAKE} CC=${HOST_CC} CFLAGS="${HOST_CFLAGS} -g" && \
|
2013-09-06 22:39:08 +00:00
|
|
|
cp -f src/sdb src/.sdb
|
2013-08-27 00:00:21 +00:00
|
|
|
cd sdb ; ${MAKE} clean
|
2013-04-30 23:29:06 +00:00
|
|
|
cd sdb ; ${MAKE} src/sdb-version.h
|
2013-08-27 00:00:21 +00:00
|
|
|
cd sdb/src ; ${MAKE} ARCH=xxx RANLIB="${RANLIB}" CFLAGS_SHARED=-fPIC \
|
2013-09-06 22:39:08 +00:00
|
|
|
CC="${CC}" AR="${AR}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" libsdb.a
|
2013-08-26 22:52:04 +00:00
|
|
|
${RANLIB} sdb/src/libsdb.a
|
2013-09-06 22:39:08 +00:00
|
|
|
cp -f sdb/src/.sdb sdb/sdb
|
2013-08-26 22:52:04 +00:00
|
|
|
|
2013-04-30 23:29:06 +00:00
|
|
|
.PHONY: sdb-sync sync-sdb sdbclean
|
|
|
|
F=README.md config.mk src Makefile
|
|
|
|
SYNCFILES=$(addprefix sdb.vc/,${F})
|
|
|
|
I=../libr/include
|
|
|
|
|
|
|
|
sdb-sync sync-sdb:
|
|
|
|
rm -rf sdb sdb.vc
|
|
|
|
git clone ${URL} sdb.vc
|
|
|
|
mkdir -p sdb
|
|
|
|
cp -rf ${SYNCFILES} sdb
|
|
|
|
rm -rf sdb.vc $I/sdb
|
|
|
|
mkdir -p $I/sdb
|
2013-07-16 15:48:26 +00:00
|
|
|
rm -f src/sdb-version.h
|
2013-04-30 23:29:06 +00:00
|
|
|
cd sdb ; ${MAKE} src/sdb-version.h
|
|
|
|
cp -f sdb/src/*.h $I/sdb
|
|
|
|
echo '#include <sdb/sdb.h>' > $I/sdb.h
|
2013-04-30 23:43:35 +00:00
|
|
|
mkdir -p sdb/test sdb/memcache
|
2013-07-19 01:35:45 +00:00
|
|
|
sed -e 's,HAVE_VALA=,HAVE_VALA=#,' sdb/config.mk > .t
|
|
|
|
mv .t sdb/config.mk
|
2013-06-04 23:13:05 +00:00
|
|
|
echo all clean mrproper: | tee sdb/test/Makefile > sdb/memcache/Makefile
|
2013-04-30 23:29:06 +00:00
|
|
|
git add $I/sdb*
|
|
|
|
git add sdb
|
2013-06-04 23:13:05 +00:00
|
|
|
|
|
|
|
$(TCCLIB) libr_tcc/libr_tcc.a:
|
|
|
|
cd libr_tcc ; ${MAKE}
|
|
|
|
|
2013-06-09 22:28:55 +00:00
|
|
|
udis-sync udis86-sync sync-udis sync-udis86:
|
|
|
|
cd udis86 ; ${MAKE} sync
|
|
|
|
|
2013-06-04 23:13:05 +00:00
|
|
|
tcc-clean tccclean:
|
|
|
|
cd libr_tcc ; ${MAKE} clean
|
|
|
|
|
|
|
|
CFILES=i386-asm.c i386-gen.c libtcc.c tccasm.c tccelf.c tccgen.c tccpp.c
|
|
|
|
HFILES=tcc.h i386-asm.h tcclib.h tcctok.h stab.h
|
2013-06-05 07:29:27 +00:00
|
|
|
HFILES+=elf.h libtcc.h config.h i386-tok.h
|
2013-06-04 23:13:05 +00:00
|
|
|
|
|
|
|
# TODO: use mob branch?
|
|
|
|
|
|
|
|
.PHONY: sdb-sync sync-sdb sdbclean
|
|
|
|
tcc-sync sync-tcc:
|
|
|
|
rm -rf _
|
|
|
|
git clone git://repo.or.cz/tinycc.git _
|
|
|
|
cd _ ; ./configure --prefix=${PREFIX}
|
|
|
|
mkdir -p tcc
|
|
|
|
for a in ${CFILES} ${HFILES} ; do cp -f _/$$a tcc ; done
|
|
|
|
cp -f _/VERSION _/COPYING _/stab.def tcc
|
|
|
|
git add tcc
|
|
|
|
rm -rf _
|
2013-06-05 07:29:27 +00:00
|
|
|
|
|
|
|
D=${DESTDIR}/${PREFIX}
|
|
|
|
install:
|
|
|
|
mkdir -p ${D}/lib
|
|
|
|
cp -f tcc/libr_tcc* ${D}/lib
|
2013-11-14 12:57:01 +00:00
|
|
|
#cp -f zip/libr_z* ${D}/lib
|
2013-06-05 07:29:27 +00:00
|
|
|
|
2013-06-05 14:15:39 +00:00
|
|
|
install-symlink symstall:
|
2013-06-05 07:29:27 +00:00
|
|
|
mkdir -p ${D}/lib
|
2013-06-05 14:15:39 +00:00
|
|
|
cd tcc ; for a in libr_tcc* ; do \
|
|
|
|
ln -fs `pwd`/$$a ${D}/lib/$$a ; done
|
2013-06-05 07:29:27 +00:00
|
|
|
|
|
|
|
uninstall deinstall:
|
|
|
|
rm -f ${D}/lib/libr_tcc*
|
2013-11-14 12:57:01 +00:00
|
|
|
#rm -f ${D}/lib/libr_z*
|