CC ?= gcc CFLAGS ?= -Wall -x c -s ifeq (${ARCH}, amd64) CFLAGS += -m64 endif ifeq (${ARCH}, i386) CFLAGS += -m32 endif LIBS = lib/stdbuf.so all: ${LIBS} %.so: %.c ${CC} ${CFLAGS} $< -fPIC -shared -o $@ clean: rm -f ${LIBS}