This is an unusual convention. How about just leaving it to the extension? `LIBSO = $(ROOT)/libphobos2.so`