make Makefile more generic for apxs