Use build variables

This commit is contained in:
Vladimir Dubrovin 2026-03-30 12:32:24 +03:00
parent ec164ffe81
commit 637d5e5539
5 changed files with 28 additions and 27 deletions

View File

@ -41,10 +41,11 @@ jobs:
- name: ln Windows
if: ${{ startsWith(matrix.target, 'windows') }}
run: copy Makefile.win Makefile
- name: dirs Windows
- name: make Windows
if: ${{ startsWith(matrix.target, 'windows') }}
run: cmd /C 'echo LIBS := -L "c:/program files/openssl/lib/VC/x64/MT" $(LIBS) >>Makefile.win && echo CFLAGS := -I "c:/program files/openssl/include" $(CFLAGS) >>Makefile.win && type Makefile.win && dir "c:/program files/openssl/lib" && set && dir "C:/mingw64/bin" && dir "C:/" && dir "C:/msys64/ucrt64/bin"'
- name: make
run: make all LIBS='-L "c:/program files/openssl/lib/VC/x64/MT"' CFLAGS='-I "c:/program files/openssl/include"'
- name: make POSIX
if: !${{ startsWith(matrix.target, 'windows') }}
run: make
- name: mkdir
if: ${{ startsWith(matrix.target, 'ubuntu') }}

View File

@ -7,14 +7,14 @@
BUILDDIR = ../bin/
CC ?= cc
CFLAGS += -c -fno-strict-aliasing -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
CFLAGS := -c -fno-strict-aliasing -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL $(CFLAGS)
COUT = -o
LN ?= ${CC}
LDFLAGS += -pthread -fno-strict-aliasing
# -lpthreads may be reuiured on some platforms instead of -pthreads
# -ldl or -lld may be required for some platforms
DCFLAGS = -fPIC
DLFLAGS = -shared
DCFLAGS ?= -fPIC
DLFLAGS ?= -shared
DLSUFFICS = .so
LIBS ?=
LIBSPREFIX = -l

View File

@ -8,14 +8,14 @@
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
BUILDDIR = ../bin/
CC = gcc
CC ?= gcc
CFLAGS = -g -fPIC -O2 -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER
CFLAGS := -g -fPIC -O2 -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER $(CFLAGS)
COUT = -o
LN = $(CC)
DCFLAGS =
LDFLAGS = -fPIC -O2 -fno-strict-aliasing -pthread
DLFLAGS = -shared
LN ?= ${CC}
DCFLAGS ?=
LDFLAGS ?= -fPIC -O2 -fno-strict-aliasing -pthread
DLFLAGS ?= -shared
DLSUFFICS = .ld.so
# -lpthreads may be reuqired on some platforms instead of -pthreads
LIBSPREFIX = -l

View File

@ -8,21 +8,21 @@
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
BUILDDIR = ../bin/
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 := -g -O2 -fno-strict-aliasing -c -pthread -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL $(CFLAGS)
COUT = -o
LN = $(CC)
LDFLAGS = -O2 -fno-strict-aliasing -pthread
LN ?= $(CC)
LDFLAGS ?= -O2 -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
DCFLAGS ?= -fPIC
DLFLAGS ?= -shared
DLSUFFICS ?= .ld.so
LIBS ?=
LIBSPREFIX = -l
LIBSSUFFIX =
LIBSPREFIX ?= -l
LIBSSUFFIX ?=
LNOUT = -o
EXESUFFICS =
OBJSUFFICS = .o

View File

@ -9,14 +9,14 @@
BUILDDIR = ../bin/
CC = gcc
CFLAGS = -O2 -s -c -mthreads -DWITH_STD_MALLOC -DWITH_WSAPOLL
CC ?= gcc
CFLAGS := -O2 -s -c -mthreads -DWITH_STD_MALLOC -DWITH_WSAPOLL $(CFLAGS)
COUT = -o
LN = gcc
LDFLAGS = -O2 -s -mthreads
DLFLAGS = -shared
LN ?= $(CC)
LDFLAGS ?= -O2 -s -mthreads
DLFLAGS ?= -shared
DLSUFFICS = .dll
LIBS = -lws2_32 -lodbc32 -ladvapi32 -luser32 -lcrypto -lssl
LIBS := -lws2_32 -lodbc32 -ladvapi32 -luser32 $(LIBS)
LIBSPREFIX = -l
LIBSSUFFIX =
LNOUT = -o