# If you want to build a shared library, then run make with SHARED=1 and VERSION=version
ifdef SHARED
LIB = libangelscript-$(VERSION).so
DEVLIB = libangelscript.so
else
LIB = libangelscript.a
endif
Later:
clean:
$(DELETER) $(OBJ) $(BIN) $(LIBDIR)/$(DEVLIB)
So in case the SHARED env is non-present, $(LIBDIR)/$(DEVLIB) is evaluated to ../../lib/ and 'make clean' fails due to rm's target being a directory. I worked around this by setting DEVLIB to libangelscript.a in the non-SHARED else block.