LIB=hello all: ${LIB}.so CPPFLAGS=-m32 -Werror -Wno-conversion -Wno-pointer-arith -Wno-write-strings -Wno-format -Wno-deprecated-declarations -MMD OBJS=\ hello.o ${LIB}.exports: ${LIB}.exports_list cat ${LIB}.exports_list | sed s/.*/_\&/ > ${LIB}.exports ${LIB}.so: ${OBJS} ${LIB}.exports $(CXX) $(CPPFLAGS) -Wl,-flat_namespace -bundle -undefined suppress -Wl,-U,_environ -o ${LIB}.so $(OBJS) -exported_symbols_list ${LIB}.exports -ldl -lpthread clean: rm -f *.o *.so *.exports