# Make the GNU Readline/History libraries

$call libs
$exit

libs:
	$ifeq (IRAFARCH, macosx) then
	    !(./configure --disable-dynamic --enable-static CFLAGS="-m32")
	    !make libreadline.a | tee spool
	    !mv libreadline.a ../../bin
	$else $ifeq (IRAFARCH, macintel) then
	    !(./configure --disable-dynamic --enable-static)
	    !make libreadline.a | tee spool
	    !mv libreadline.a ../../bin
	$else $ifeq (IRAFARCH, linux) then
	    !(./configure --disable-dynamic --enable-static CFLAGS="-m32")
	    !make libreadline.a | tee spool
	    !mv libreadline.a ../../bin
	$else $ifeq (IRAFARCH, freebsd) then
	    !(./configure --disable-dynamic --enable-static CFLAGS="-m32")
	    !make libreadline.a | tee spool
	    !mv libreadline.a ../../bin
	$else
	    !(./configure --disable-dynamic --enable-static)
	    !make libreadline.a | tee spool
	    !mv libreadline.a ../../bin
	$endif
	!make distclean
	!rm -rf Makefile *spool*
	;

clean:
	!make clean
	!rm -rf Makefile *spool*
	;

