- gcc -fPIC -DPIC -c $(source) -o $(object)
- ld -shared -soname=$(base) -lc $(object) -o $(shared_lib)
+ ifneq ($(OS_CYGWIN),0)
+ gcc -c $(source) -o $(object)
+ ld -shared -soname=$(base) $(LDFLAGS) $(object) -o $(shared_lib)
+ else
+ ifneq ($(OS_LINUX64),0)
+ gcc -fPIC -DPIC -c $(source) -o $(object)
+ ld -shared -soname=$(base) -lc $(object) -o $(shared64_lib)
+ rm -f $(object)
+ @echo "Ensure that you have multiarch i386 build tools if you want to build 32-bit library"
+ -gcc -m32 -fPIC -DPIC -c $(source) -o $(object)
+ -ld -melf_i386 -shared -soname=$(base) -lc $(object) -o $(shared_lib)
+ else
+ gcc -fPIC -DPIC -c $(source) -o $(object)
+ ld -shared -soname=$(base) -lc $(object) -o $(shared_lib)
+ endif