I've had this issue (using premake4 and premake5). I've used two 
workarounds:
- writing a emar.sh and use this linker instead of emar
- patching premake (in make_cpp.lua)

I'm using the second approach, because I had other things to change in 
premake anyway, but I've attached my emar.sh script to this message which 
I've used before.

On Monday, March 3, 2014 9:46:00 PM UTC+1, wolfviking0 wrote:
>
> Hi,
>
> I have  a demo who use premake4 for generate makefile, I try to use emmar 
> for build the sample and seems working except for the AR part.
>
> The makefile generated by pre make use : LINKCMD    = $(AR) -rcs $(TARGET) 
> $(OBJECTS)
>
> When I call emar make on this file I have a failed for unknown parameter 
> -rcs.
>
> I don't yet find a way for change this option generated by premake4, If 
> someone has already use premake4 with emscripten, will be nice to have some 
> help about that.
>
> Seems the option must be only rcs without '-' and when I do that seems 
> create my library, but I can't modify all the generated makefile like that 
> is not  a good way.
>
> Thanks 
>
> Tony
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
#!/bin/bash

if [[ -z "${EMSCRIPTEN}" ]]; then
	echo "EMSCRIPTEN is not defined" > /dev/stderr
	exit 1
fi

BIN="${EMSCRIPTEN}/emar"
ARGS=()

for ARG in "$@"; do
	if [[ "${ARG}" == "-rcs" ]]; then
		ARGS+=("rk")
	else
		ARGS+=("${ARG}")
	fi
done

test "$verbose" != 0 && echo "${BIN} ${ARGS}"
python "${BIN}" "${ARGS[@]}"

Reply via email to