condense some shared makefile stuff