ifdef WINDOWS
./w3.dll: ./Core.o ./Util.o ./DNS.o ./HTTP.o
- $(CC) $(LDFLAGS) -shared -o $@ $^ $(LIBS)
+ $(CC) $(LDFLAGS) -shared -Wl,--out-implib,./w3.lib -o $@ $^ $(LIBS)
else
./libw3.so: ./Core.o ./Util.o ./DNS.o ./HTTP.o
$(CC) $(LDFLAGS) -shared -o $@ $^ $(LIBS)
$(CC) $(CFLAGS) -c -o $@ $<
clean:
- rm -f *.o *.so *.core *~ *.dll
+ rm -f *.o *.so *.core *~ *.dll *.lib
install: ./libw3.so
mkdir -p $(PREFIX)/lib
mkdir -p w3-$(VERSION)/Library
mkdir -p w3-$(VERSION)/Example
cp $(ALL) ./Library/*.h w3-$(VERSION)/
+ifdef WINDOWS
+ -cp ./Library/*.lib w3-$(VERSION)/
+endif
-mv w3-$(VERSION)/*.h w3-$(VERSION)/Library/
-mv w3-$(VERSION)/*.so w3-$(VERSION)/Library/
-mv w3-$(VERSION)/*.dll w3-$(VERSION)/Library/
+ -mv w3-$(VERSION)/*.lib w3-$(VERSION)/Library/
-mv w3-$(VERSION)/fetch.exe w3-$(VERSION)/Example/w3-fetch.exe
-mv w3-$(VERSION)/fetch w3-$(VERSION)/Example/w3-fetch
-cp LICENSE w3-$(VERSION)/