Refresh Makefile.FreeBSD to current versions

Change default compilter to clang (cc)
Append CFLAGS and LDFLAGS instead of hardcoding
Remove hardcoded optimization and no-strict-aliasing
Fix typo

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
This commit is contained in:
Daniel Engberg 2021-07-03 23:03:43 +02:00 committed by GitHub
parent 5fa261e91e
commit c11ef73cc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,20 +1,17 @@
# #
# 3 proxy Makefile for GCC/Unix # 3 proxy Makefile for FreeBSD
#
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries
# #
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC # remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
# 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 ?= cc
CFLAGS = -c -O -fno-strict-aliasing -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL CFLAGS += -c -DNOODBC -DFD_SETSIZE=4096 -DWITH_POLL
COUT = -o COUT = -o
LN ?= ${CC} LN ?= ${CC}
LDFLAGS = -pthread -O -fno-strict-aliasing LDFLAGS += -pthread
# -lpthreads may be reuqired on some platforms instead of -pthreads # -lpthreads may be required 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