From: nishi Date: Thu, 1 Feb 2024 23:15:00 +0000 (+0000) Subject: fix X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=29685da9c103275cbaf6c76a42cb7c91a6c0f0d5;p=libw3.git fix git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@151 d27a3e52-49c5-7645-884c-6793ebffc270 --- diff --git a/Library/Makefile b/Library/Makefile index 0465473..a5fa106 100644 --- a/Library/Makefile +++ b/Library/Makefile @@ -5,7 +5,7 @@ OBJS = ./Core.o ./Util.o ./DNS.o ./HTTP.o ./Gopher.o ./POP3.o ./File.o ./URL.o . 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) diff --git a/Makefile b/Makefile index af2240b..7ae8ed2 100644 --- a/Makefile +++ b/Makefile @@ -23,12 +23,14 @@ ifeq ($(WIN32),YES) 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) @@ -56,7 +58,7 @@ ALL := ./Library/w3.dll ./Example 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