1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

- Add stage support

- Simplify Makefile
This commit is contained in:
Danilo Egea Gondolfo 2013-11-16 15:30:29 +00:00
parent 95e58be89c
commit ffcc3f5ecf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=334006
2 changed files with 12 additions and 38 deletions

View File

@ -16,31 +16,7 @@ ALL_TARGET= ${PORTNAME}
OPTIONS_DEFINE= OPTIMIZED_CFLAGS
OPTIONS_DEFAULT= OPTIMIZED_CFLAGS
NO_STAGE= yes
do-install:
# Program.
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
# Data.
${MKDIR} ${DATADIR}
${CP} -R ${WRKSRC}/warriors ${DATADIR}
${INSTALL_SCRIPT} ${WRKSRC}/bench.sh ${DATADIR}
.include <bsd.port.pre.mk>
# Adjust optimization flags for all architectures.
.if ${ARCH} != "i386"
BADCFLAGS+= -malign-double
.endif
.if ${ARCH} != "amd64" && ${ARCH} != "i386"
BADCFLAGS+= -maccumulate-outgoing-args \
-minline-all-stringops \
-mno-align-stringops
.endif
.if ${ARCH} == "alpha"
BADCFLAGS+= -ffast-math \
-fprefetch-loop-arrays
.endif
.include <bsd.port.options.mk>
post-patch:
# Fix bench.sh.
@ -48,17 +24,15 @@ post-patch:
s|\./exmars|exmars|' \
${WRKSRC}/bench.sh
# Fix Makefile.
@${REINPLACE_CMD} -e 's|\($${OPT}\)|${CFLAGS} \1|' ${WRKSRC}/${MAKEFILE}
# Enable/disable compilation optimizations.
.if empty(PORT_OPTIONS:MOPTIMIZED_CFLAGS)
@${REINPLACE_CMD} -e 's|$${OPT}||' ${WRKSRC}/${MAKEFILE}
.if ! ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
@${REINPLACE_CMD} -e 's|$${OPT}|${CFLAGS}|' ${WRKSRC}/${MAKEFILE}
.endif
# Adjust optimization flags for all architectures.
.for f in ${BADCFLAGS}
@${REINPLACE_CMD} -e 's|${f}||g' ${WRKSRC}/${MAKEFILE}
.endfor
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DATADIR}
${CP} -R ${WRKSRC}/warriors ${STAGEDIR}${DATADIR}
${INSTALL_SCRIPT} ${WRKSRC}/bench.sh ${STAGEDIR}${DATADIR}
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
--- Makefile.orig Thu Oct 16 04:59:17 2003
+++ Makefile Thu Jul 7 15:32:24 2005
--- ./Makefile.orig 2003-10-16 04:59:17.000000000 -0300
+++ ./Makefile 2013-11-16 13:19:29.000000000 -0200
@@ -1,9 +1,9 @@
# default flags
-CCFLAGS = -O3 -fomit-frame-pointer
@ -8,7 +8,7 @@
# my own highly tuned settings
#CC = gcc-3.3.1
-#CCFLAGS = -O3 -fomit-frame-pointer -fforce-addr -funroll-all-loops -fstrict-aliasing -malign-double -fprefetch-loop-arrays -maccumulate-outgoing-args -minline-all-stringops -finline-functions -finline-limit=800 -ffast-math -mno-align-stringops
+OPT = -O3 -fomit-frame-pointer -fforce-addr -funroll-all-loops -fstrict-aliasing -malign-double -fprefetch-loop-arrays -maccumulate-outgoing-args -minline-all-stringops -finline-functions -finline-limit=800 -ffast-math -mno-align-stringops
+OPT = -O3 -fomit-frame-pointer -funroll-all-loops -fstrict-aliasing -fprefetch-loop-arrays -minline-all-stringops -finline-functions -ffast-math
#CCFLAGS += -mfpmath=sse,387 -mmmx -msse -march=pentium3
# develomental flags