]> Nishi Git Mirror - libw3.git/commitdiff
fix
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Thu, 1 Feb 2024 23:15:00 +0000 (23:15 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Thu, 1 Feb 2024 23:15:00 +0000 (23:15 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@151 d27a3e52-49c5-7645-884c-6793ebffc270

Library/Makefile
Makefile

index 0465473bc3d81f99475361044d216f533cd23d71..a5fa106f5536cc7a0edcf896bd3e14ab8e64e0f2 100644 (file)
@@ -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)
index af2240b8ab5d06cefe145aba8e35a4c2a3f3adfd..7ae8ed2605cf724c5758993bf01a9ff0808d18c4 100644 (file)
--- 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