From d4241c0ba33689b1d4e8d0b92211f48098918cdd Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Mon, 24 May 2004 23:41:57 +0000 Subject: - Add WITH_OPTIMIZED_CFLAGS knob to build with optimizations - Add WITH_JITC knob to select jitc_x86 CPU, only for i386 PR: ports/67132 Submitted by: Roman Bogorodskiy (maintainer) --- emulators/pearpc/Makefile | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/emulators/pearpc/Makefile b/emulators/pearpc/Makefile index 6b2838376d3b..053ae8b1c3c2 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 + +.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 +.include -- cgit v1.2.3