Closed ldonzis closed 2 years ago
Hi @ldonzis. Many thanks for flagging this issue! I was able to reproduce it and I can confirm that your fix works. I will submit the fix soon. Could you give me your details (name and email address), if you are OK with me adding you as the author of the fix.
On FreeBSD (I'm using 13.0, but I don't think it matters), the Makefile incorrectly detects the system as being Windows, due to this:
MINGW ?= $(shell $(CC) -dM -E - < /dev/null | grep -i mingw | wc -l)
The output of "wc -l" contains leading spaces, and this causes the "ifeq" statements to mismatch because the value is not actually zero, but rather, the string " 0". There are several ways to solve this, for example, the following minor to change to remove leading spaces:
MINGW ?= $(shell $(CC) -dM -E - < /dev/null | grep -i mingw | wc -l | sed 's/^ *//')
This makes it compile properly on FreeBSD and doesn't hurt the other operating systems since they don't have leading spaces.