ifeq ($(PREFIX),) PREFIX := /usr/local endif .PHONY: all install all: libdscp libdscp: $(CC) \ -static \ -o $@.so $@.c \ -D_GNU_SOURCE \ -nostartfiles -shared \ -lm -lc install: libdscp install -d $(DESTDIR)$(PREFIX)/lib/ install -m 644 libdscp.so $(DESTDIR)$(PREFIX)/lib/