add ex1_gen for Mac OS X