2009-03-09 01:14:50 +00:00
PREFIX = ${ PWD } /../prefix
DESTDIR ?= ../
PFX = ${ DESTDIR } ${ PREFIX }
#PREFIX=${PFX}
2009-02-05 21:08:46 +00:00
# Libraries
2009-03-13 10:39:54 +00:00
LIBLIST = io util lib meta lang flags bin macro hash line cons line print config syscall range socket cmd asm anal parse search diff debug reg core var sign trace
2009-02-05 21:08:46 +00:00
# Under development
#LIBLIST+=print
#LIBLIST+=util
#LIBLIST+=search
# TODO : generate single library linking against the rest
#LIBSO=libr.so
#LIBAR=libr.a
all :
for lib in ${ LIBLIST } ; do ( cd $$ { lib} && ${ MAKE } all ) ; done
@echo Build done for : ${ LIBLIST }
install :
2009-03-09 01:14:50 +00:00
echo Using prefix: ${ PREFIX }
2009-02-05 21:08:46 +00:00
# libraries
@mkdir -p ${ PREFIX } /lib
2009-02-11 23:04:30 +00:00
@for a in ` find * | grep -e '\.so$$' | grep lib` ; do \
2009-02-05 21:08:46 +00:00
echo " $$ a " ; cp $$ a ${ PREFIX } /lib ; done
# object archives
@for a in ` find * | grep -e '\.a$$' ` ; do \
echo " $$ a " ; cp $$ a ${ PREFIX } /lib ; done
# includes
2009-03-07 17:47:59 +00:00
@mkdir -p ${ PREFIX } /include/libr
( cd include && cp -f * ${ PREFIX } /include/libr)
2009-02-05 21:08:46 +00:00
# programs
@mkdir -p ${ PREFIX } /bin
2009-02-06 12:17:51 +00:00
@for a in ` find */t -perm /u+x -type f | grep 2` ; \
do echo " $$ a " ; cp $$ a ${ PREFIX } /bin ; done
2009-02-06 17:22:27 +00:00
# plugins
2009-03-09 13:08:53 +00:00
@mkdir -p ${ PREFIX } /lib/pkgconfig
@cat libr.pc.acr | sed -e 's,@PREFIX@,${PREFIX},g' > libr.pc
cp libr.pc ${ PREFIX } /lib/pkgconfig
2009-03-10 01:49:24 +00:00
@mkdir -p ${ PREFIX } /share/vala/vapi
cp vapi/*.vapi vapi/*.deps ${ PREFIX } /share/vala/vapi
2009-02-09 00:54:09 +00:00
@mkdir -p ${ PREFIX } /lib/radare2
2009-02-06 17:22:27 +00:00
@for a in ` find */p -perm /u+x -type f` ; \
2009-02-09 00:54:09 +00:00
do echo " $$ a " ; cp $$ a ${ PREFIX } /lib/radare2 ; done
2009-02-05 21:08:46 +00:00
# test programs
@mkdir -p ${ PREFIX } /bin-test
2009-02-06 12:17:51 +00:00
@for a in ` find */t -perm /u+x -type f | grep -v 2` ; \
2009-02-05 21:08:46 +00:00
do echo " $$ a " ; cp $$ a ${ PREFIX } /bin-test ; done
@echo libr aka radare2 has been installed in PREFIX = ${ PREFIX }
2009-03-06 00:38:23 +00:00
uninstall :
# libraries
-@for a in ` find * | grep -e '\.so$$' | grep lib` ; do \
a = ` echo $$ a| awk -F / '{ print $$NF; }' ` ; \
echo ${ PREFIX } /lib/$$ a ; rm -f ${ PREFIX } /lib/$$ a ; done
### object archives
-@for a in ` find * | grep -e '\.a$$' ` ; do \
a = ` echo $$ a| awk -F / '{ print $$NF; }' ` ; \
echo ${ PREFIX } /lib/$$ a ; rm -f ${ PREFIX } /lib/$$ a ; done
### includes
2009-03-07 17:47:59 +00:00
-( cd include && for a in * ; do rm -f ${ PREFIX } /libr/$$ a ; done )
2009-03-10 11:21:46 +00:00
cd vapi/ ; for a in *.vapi *.deps ; do rm -f ${ PREFIX } /share/vala/vapi/$$ a ; done
2009-03-06 00:38:23 +00:00
### programs
-@for a in ` find */t -perm /u+x -type f | grep 2` ; do \
a = ` echo $$ a| awk -F / '{ print $$NF; }' ` ; \
echo ${ PREFIX } /bin/$$ a ; rm -f ${ PREFIX } /bin/$$ a ; done
# plugins
-@for a in ` find */p -perm /u+x -type f` ; do \
a = " ${ PREFIX } /lib/radare2/`echo $$ a|awk -F / '{ print $$ NF; }'` " ; \
echo $$ a ; rm -f $$ a ; done
rm -rf ${ PREFIX } /lib/radare2
2009-03-09 13:08:53 +00:00
rm -f ${ PREFIX } /lib/pkgconfig/libr.pc
2009-03-06 00:38:23 +00:00
# test programs
-@for a in ` find */t -perm /u+x -type f | grep -v 2` ; do \
a = " ${ PREFIX } /bin-test/`echo $$ a|awk -F / '{ print $$ NF; }'` " ; \
echo $$ a ; rm -f $$ a ; done
rm -rf ${ PREFIX } /bin-test
@echo libr aka radare2 has been uninstalled from PREFIX = ${ PREFIX }
2009-02-05 21:08:46 +00:00
todo :
grep -re TODO *
clean :
for lib in ${ LIBLIST } ; do ( cd $$ { lib} && ${ MAKE } clean ) ; done
2009-02-16 23:09:40 +00:00
cd vapi/t && ${ MAKE } clean
2009-03-10 11:21:46 +00:00
rm -f libr.pc