ifeq ($(WINDOWS),YES)
./w3.dll: $(OBJS)
- $(CC) $(LDFLAGS) -L../openssl/lib/mingw/x64 -shared -Wl,--out-implib,./w3.lib -o $@ $^ $(LIBS)
+ $(CC) $(LDFLAGS) -L../openssl/lib/mingw/$(WINARCH) -shared -Wl,--out-implib,./w3.lib -o $@ $^ $(LIBS)
else
./libw3.so: $(OBJS)
CC := i686-w64-mingw32-gcc
WINDRES := i686-w64-mingw32-windres
WINDOWS := YES
+WINARCH := x86
endif
ifeq ($(WIN64),YES)
CC := x86_64-w64-mingw32-gcc
WINDRES := x86_64-w64-mingw32-windres
WINDOWS := YES
+WINARCH := x64
endif
ifeq ($(WINDOWS),YES)
all: ./Library/W3Version.h ./w3.pc $(ALL)
./Library/w3.dll:
- $(MAKE) -C ./Library CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" WINDOWS=YES
+ $(MAKE) -C ./Library CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" WINDOWS=YES WINARCH=$(WINARCH)
./Example: ./Library/w3.dll
$(MAKE) -C ./Example CC=$(CC) examples SUFFIX=.exe