ports/games/mvdsv/files/patch-Makefile.BSD
2021-09-25 02:43:04 +00:00

50 lines
1.6 KiB
Text

--- Makefile.BSD.orig 2021-09-21 22:21:56 UTC
+++ Makefile.BSD
@@ -17,12 +17,11 @@ SV_DIR = ./src
# for gcc its like: make mvdsv FORCE32BITFLAGS=-m32
# configure script add FORCE32BITFLAGS=-m32
-DO_CFLAGS = ${CFLAGS} -Wall -pipe -pthread -funsigned-char -DSERVERONLY -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__ __ORDER\(.*_ENDIAN__\),_\1,p'
+DO_CFLAGS = ${CFLAGS} -Wall -pipe -funsigned-char -DWWW_INTEGRATION -DSERVERONLY -DUSE_PR2 -D${BYTE_ORDER}Q__ ${FORCE32BITFLAGS}
-WITH_OPTIMIZED_CFLAGS = YES
-
.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)
USE_ASM=-Did386
DO_CFLAGS += ${USE_ASM}
@@ -35,7 +34,7 @@ STRIP_FLAGS = --strip-unneeded
.endif
STRIP_FLAGS += --remove-section=.comment
-LDFLAGS = -lm
+LDFLAGS += -lm -lpthread -lpcre -lcurl
#############################################################################
# SERVER
@@ -90,9 +89,6 @@ SV_OBJS = \
${SV_DIR}/world.o \
${SV_DIR}/zone.o \
\
- ${SV_DIR}/pcre/get.o \
- ${SV_DIR}/pcre/pcre.o \
-\
${SV_DIR}/central.o
.ifdef USE_ASM
@@ -106,10 +102,10 @@ SV_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: mvdsv
${STRIP} ${STRIP_FLAGS} mvdsv