Reputation: 28890
I have a legacy Makefile which is using the -W1 argument, I didn't find any reference to that, I thought it might be a typo, that the '1' is supposed to be 'l'. However, it works... So, can anyone explain why this line works ?
@$(CC) $(CFLAGS) -shared -W1,-soname,$(LIBNAME) -o $(OUTDIR)/$(LIBNAME) $(OBJS)
$(CC) is GCC, and the files compiled are C files. When I tried to compile CPP files using this command, only then I get
cc1plus: error: unrecognized command line option "-W1,-soname...
Upvotes: 4
Views: 5631
Reputation: 409196
It looks like a typo, and that should be -Wl
instead.
It's sometimes hard to differ between lower-case L (l
) and the digit 1 in some fonts.
Upvotes: 3