--- Makefile.unix.orig 2018-04-18 19:48:45 UTC +++ Makefile.unix @@ -8,18 +8,18 @@ # library support. Add -DSAFESQL for poorely written ODBC library / drivers. BUILDDIR = -CC = gcc +CC ?= gcc # you may need -L/usr/pkg/lib for older NetBSD versions -CFLAGS = -g -O2 -fno-strict-aliasing -c -pthread -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL +CFLAGS = -c -O2 -pipe -fstack-protector -fno-strict-aliasing -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL COUT = -o -LN = gcc -LDFLAGS = -O2 -fno-strict-aliasing -pthread +LN ?= ${CC} +LDFLAGS = -fno-strict-aliasing -pthread # -lpthreads may be reuqired on some platforms instead of -pthreads # -ldl or -lld may be required for some platforms DCFLAGS = -fpic DLFLAGS = -shared -DLSUFFICS = .ld.so +DLSUFFICS = .so LIBS = LIBSPREFIX = -l LIBSSUFFIX =