aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/pearpc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/pearpc/Makefile')
-rw-r--r--emulators/pearpc/Makefile29
1 files changed, 27 insertions, 2 deletions
diff --git a/emulators/pearpc/Makefile b/emulators/pearpc/Makefile
index 6b2838376d3..053ae8b1c3c 100644
--- a/emulators/pearpc/Makefile
+++ b/emulators/pearpc/Makefile
@@ -19,9 +19,34 @@ USE_REINPLACE= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include" \
LDFLAGS="-L${X11BASE}/lib"
-CONFIGURE_ARGS= --disable-fpo
PKGMESSAGE= ${WRKDIR}/pkg-message
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_OPTIMIZED_CFLAGS)
+CFLAGS+= -O3 -ffast-math
+.else
+CONFIGURE_ARGS+= --disable-fpo
+.endif
+
+# jitc_x86 is avaible only on x86
+.if ${ARCH} == "i386"
+.if !defined(WITH_JITC)
+CONFIGURE_ARGS+= --enable-cpu=generic
+.else
+CONFIGURE_ARGS+= --enable-cpu=jitc_x86
+.endif # WITH_JITC
+.else
+CONFIGURE_ARGS+= --enable-cpu=generic
+.endif
+
+pre-everything::
+.if !defined(WITH_OPTIMIZED_CFLAGS)
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "You can do optimized build defining WITH_OPTIMIZED_CFLAGS=yes."
+ @${ECHO_MSG} ""
+.endif
+
post-configure:
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/src/Makefile
@@ -33,4 +58,4 @@ post-install:
@${CAT} ${PKGMESSAGE}
@${INSTALL_DATA} ${WRKSRC}/ppccfg.example ${PREFIX}/etc/ppccfg.example
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>