New makefile, supports subdirs
Fixed #1, if else problem