885a045ee4
- Explicitly deduce endianness instead of patching sources - Do not build bundled PCRE code, use the one from ports - ASM option is 32-bit only and implies OPTIMIZED_CFLAGS - Unfortunately, upstream had removed BSD Kqueue support - Actualize WWW line in the port descriptions while here
53 lines
1.7 KiB
Text
53 lines
1.7 KiB
Text
--- tools/qwdtools/source/Makefile.BSD.orig 2020-03-18 18:17:05 UTC
|
|
+++ tools/qwdtools/source/Makefile.BSD
|
|
@@ -12,24 +12,19 @@
|
|
#
|
|
|
|
MAINDIR = ../../..
|
|
-SV_DIR = $(MAINDIR)/source
|
|
+SV_DIR = $(MAINDIR)/src
|
|
QWDTOOLS_DIR = $(MAINDIR)/tools/qwdtools/source
|
|
|
|
# To compile qwdtools as 32bit on 64bit target platform use next:
|
|
# for gcc its like: make qwdtools FORCE32BITFLAGS=-m32
|
|
# configure script add FORCE32BITFLAGS=-m32
|
|
|
|
-DO_CFLAGS = ${CFLAGS} -Wall -pipe -pthread -funsigned-char -DUSE_PR2 -D${BYTE_ORDER}Q__ ${FORCE32BITFLAGS}
|
|
+BYTE_ORDER!= ${CC} -x c -dM -E /usr/include/machine/endian.h | sed -n 's,\#define _BYTE_ORDER \(.*\),_\1__,p'
|
|
+DO_CFLAGS = ${CFLAGS} -Wall -pipe -funsigned-char -DSERVERONLY -D${BYTE_ORDER}Q__ ${FORCE32BITFLAGS}
|
|
|
|
-.if !defined(NOKQUEUE) && (${UNAME} == "FreeBSD" || ${UNAME} == "DragonFly")
|
|
-DO_CFLAGS += -DKQUEUE
|
|
-.endif
|
|
-
|
|
-WITH_OPTIMIZED_CFLAGS = YES
|
|
-
|
|
USE_ASM=-Did386
|
|
.if defined(WITH_OPTIMIZED_CFLAGS)
|
|
-DO_CFLAGS += -O2 -fno-strict-aliasing -ffast-math -funroll-loops
|
|
+DO_CFLAGS += -ffast-math -funroll-loops
|
|
. if ${MACHINE_ARCH} == "i386" && !defined(WITHOUT_X86_ASM)
|
|
ASM=${USE_ASM}
|
|
DO_CFLAGS += ${ASM}
|
|
@@ -60,7 +55,7 @@ QWDTOOLS_OBJS = \
|
|
${QWDTOOLS_DIR}/sync.o \
|
|
${QWDTOOLS_DIR}/tools.o
|
|
|
|
-.if ${USE_ASM} == ${ASM}
|
|
+.if defined(ASM) && ${USE_ASM} == ${ASM}
|
|
QWDTOOLS_ASM_OBJS = \
|
|
${SV_DIR}/bothtoolsa.o
|
|
.endif
|
|
@@ -70,10 +65,10 @@ QWDTOOLS_ASM_OBJS = \
|
|
#############################################################################
|
|
|
|
.c.o:
|
|
- ${CC} ${DO_CFLAGS} -c $< -o $*.o
|
|
+ ${CC} ${DO_CFLAGS} -c $< -o $@
|
|
|
|
.s.o:
|
|
- ${CC} ${DO_CFLAGS} -DELF -x assembler-with-cpp -c $< -o $*.o
|
|
+ ${CC} ${DO_CFLAGS} -DELF -x assembler-with-cpp -c $< -o $@
|
|
|
|
all: qwdtools
|
|
${STRIP} ${STRIP_FLAGS} qwdtools
|