mirror of
https://github.com/3proxy/3proxy.git
synced 2026-04-06 21:30:12 +08:00
Use build variables
This commit is contained in:
parent
ec164ffe81
commit
637d5e5539
7
.github/workflows/c-cpp.yml
vendored
7
.github/workflows/c-cpp.yml
vendored
@ -41,10 +41,11 @@ jobs:
|
|||||||
- name: ln Windows
|
- name: ln Windows
|
||||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
if: ${{ startsWith(matrix.target, 'windows') }}
|
||||||
run: copy Makefile.win Makefile
|
run: copy Makefile.win Makefile
|
||||||
- name: dirs Windows
|
- name: make Windows
|
||||||
if: ${{ startsWith(matrix.target, '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"'
|
run: make all LIBS='-L "c:/program files/openssl/lib/VC/x64/MT"' CFLAGS='-I "c:/program files/openssl/include"'
|
||||||
- name: make
|
- name: make POSIX
|
||||||
|
if: !${{ startsWith(matrix.target, 'windows') }}
|
||||||
run: make
|
run: make
|
||||||
- name: mkdir
|
- name: mkdir
|
||||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
||||||
|
|||||||
@ -7,14 +7,14 @@
|
|||||||
BUILDDIR = ../bin/
|
BUILDDIR = ../bin/
|
||||||
CC ?= cc
|
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
|
COUT = -o
|
||||||
LN ?= ${CC}
|
LN ?= ${CC}
|
||||||
LDFLAGS += -pthread -fno-strict-aliasing
|
LDFLAGS += -pthread -fno-strict-aliasing
|
||||||
# -lpthreads may be reuiured on some platforms instead of -pthreads
|
# -lpthreads may be reuiured on some platforms instead of -pthreads
|
||||||
# -ldl or -lld may be required for some platforms
|
# -ldl or -lld may be required for some platforms
|
||||||
DCFLAGS = -fPIC
|
DCFLAGS ?= -fPIC
|
||||||
DLFLAGS = -shared
|
DLFLAGS ?= -shared
|
||||||
DLSUFFICS = .so
|
DLSUFFICS = .so
|
||||||
LIBS ?=
|
LIBS ?=
|
||||||
LIBSPREFIX = -l
|
LIBSPREFIX = -l
|
||||||
|
|||||||
@ -8,14 +8,14 @@
|
|||||||
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
||||||
|
|
||||||
BUILDDIR = ../bin/
|
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
|
COUT = -o
|
||||||
LN = $(CC)
|
LN ?= ${CC}
|
||||||
DCFLAGS =
|
DCFLAGS ?=
|
||||||
LDFLAGS = -fPIC -O2 -fno-strict-aliasing -pthread
|
LDFLAGS ?= -fPIC -O2 -fno-strict-aliasing -pthread
|
||||||
DLFLAGS = -shared
|
DLFLAGS ?= -shared
|
||||||
DLSUFFICS = .ld.so
|
DLSUFFICS = .ld.so
|
||||||
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
||||||
LIBSPREFIX = -l
|
LIBSPREFIX = -l
|
||||||
|
|||||||
@ -8,21 +8,21 @@
|
|||||||
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
||||||
|
|
||||||
BUILDDIR = ../bin/
|
BUILDDIR = ../bin/
|
||||||
CC = gcc
|
CC ?= gcc
|
||||||
|
|
||||||
# you may need -L/usr/pkg/lib for older NetBSD versions
|
# 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
|
COUT = -o
|
||||||
LN = $(CC)
|
LN ?= $(CC)
|
||||||
LDFLAGS = -O2 -fno-strict-aliasing -pthread
|
LDFLAGS ?= -O2 -fno-strict-aliasing -pthread
|
||||||
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
||||||
# -ldl or -lld may be required for some platforms
|
# -ldl or -lld may be required for some platforms
|
||||||
DCFLAGS = -fPIC
|
DCFLAGS ?= -fPIC
|
||||||
DLFLAGS = -shared
|
DLFLAGS ?= -shared
|
||||||
DLSUFFICS = .ld.so
|
DLSUFFICS ?= .ld.so
|
||||||
LIBS ?=
|
LIBS ?=
|
||||||
LIBSPREFIX = -l
|
LIBSPREFIX ?= -l
|
||||||
LIBSSUFFIX =
|
LIBSSUFFIX ?=
|
||||||
LNOUT = -o
|
LNOUT = -o
|
||||||
EXESUFFICS =
|
EXESUFFICS =
|
||||||
OBJSUFFICS = .o
|
OBJSUFFICS = .o
|
||||||
|
|||||||
12
Makefile.win
12
Makefile.win
@ -9,14 +9,14 @@
|
|||||||
|
|
||||||
|
|
||||||
BUILDDIR = ../bin/
|
BUILDDIR = ../bin/
|
||||||
CC = gcc
|
CC ?= gcc
|
||||||
CFLAGS = -O2 -s -c -mthreads -DWITH_STD_MALLOC -DWITH_WSAPOLL
|
CFLAGS := -O2 -s -c -mthreads -DWITH_STD_MALLOC -DWITH_WSAPOLL $(CFLAGS)
|
||||||
COUT = -o
|
COUT = -o
|
||||||
LN = gcc
|
LN ?= $(CC)
|
||||||
LDFLAGS = -O2 -s -mthreads
|
LDFLAGS ?= -O2 -s -mthreads
|
||||||
DLFLAGS = -shared
|
DLFLAGS ?= -shared
|
||||||
DLSUFFICS = .dll
|
DLSUFFICS = .dll
|
||||||
LIBS = -lws2_32 -lodbc32 -ladvapi32 -luser32 -lcrypto -lssl
|
LIBS := -lws2_32 -lodbc32 -ladvapi32 -luser32 $(LIBS)
|
||||||
LIBSPREFIX = -l
|
LIBSPREFIX = -l
|
||||||
LIBSSUFFIX =
|
LIBSSUFFIX =
|
||||||
LNOUT = -o
|
LNOUT = -o
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user