Added two makefiles and slightly modified old ones

Hand from text ui does not compile, but I don't think I have authority to fix it
as I please, since the fix is not obvious.