--- Makefile.unix.orig 2016-01-19 22:20:05 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 -c -pthread -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL +CFLAGS = -c %%CFLAGS%% -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL COUT = -o -LN = gcc -LDFLAGS = -O2 -pthread +LN ?= ${CC} +LDFLAGS = -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 = LNOUT = -o EXESUFFICS =