On 2022/11/18 10:27, Omar Polo wrote:
> Hello,
> 
> On 2022/11/16 02:06:46 +0100, tux0r <[email protected]> wrote:
> > Finally, a new major version. Updated port attached.
> > 
> > tux0r.
> 
> here's a slightly tweaked diff.  I didn't know that you could use make
> even without a Makefile in a 'simple' case like this (one source file,
> one executable), but I'd prefer to be more explicit and just run c++.

This uses the default rules in /usr/share/mk/sys.mk.

Either way is OK I think though ports doesn't make it easy to use
the default rules with no Makefile, and for a single file build
I'd probably take your approach too.

> -             CXXFLAGS="${CXXFLAGS}" \
> -             CPPFLAGS="${CPPFLAGS}"
> +CFLAGS +=    -Dunix
> +LDFLAGS +=   -lm
> +
> +USE_WXNEEDED =       Yes
>  
> -CPPFLAGS +=  -Dunix
> -USE_WXNEEDED=        Yes
> +do-build:
> +     cd ${WRKSRC} && ${SET_ENV} ${MAKE_ENV} \
> +             ${CXX} ${CFLAGS} -o zpaqfranz zpaqfranz.cpp ${LDFLAGS}

CPPFLAGS is more correct for -D really. But if you're running ${CXX}
directly I wouldn't bother with the indirection and just put -Dunix
on the command line.

C++ -> should pass CXXFLAGS not CFLAGS.

Reply via email to