./fetch: ./fetch.c $(RESFILE)
$(CC) -o $@ -I ../Library -L ../Library $^ -lw3
-./fetch.res: ./fetch.rc
+./libw3.res: ./libw3.rc
$(WINDRES) $< -O coff -o $@
clean:
BEGIN
BLOCK "StringFileInfo"
BEGIN
- BLOCK "041104B0"
+ BLOCK "000004b0"
BEGIN
- VALUE "FileDescription", "LibW3 Fetch"
+ VALUE "ProductName", "LibW3 Tool\0"
END
END
END
# $Id$
.PHONY: clean install
+OBJS = ./Core.o ./Util.o ./DNS.o ./HTTP.o
+
ifeq ($(WINDOWS),YES)
-./w3.dll: ./Core.o ./Util.o ./DNS.o ./HTTP.o
+./w3.dll: $(OBJS)
$(CC) $(LDFLAGS) -shared -Wl,--out-implib,./w3.lib -o $@ $^ $(LIBS)
else
-./libw3.so: ./Core.o ./Util.o ./DNS.o ./HTTP.o
+./libw3.so: $(OBJS)
$(CC) $(LDFLAGS) -shared -o $@ $^ $(LIBS)
-./libw3.a: ./Core.o ./Util.o ./DNS.o ./HTTP.o
+./libw3.a: $(OBJS)
ar rcs $@ $^
endif
$(MAKE) -C ./Library CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" WINDOWS=YES
./Example/fetch.exe: ./Library/w3.dll
- $(MAKE) -C ./Example CC=$(CC) fetch RESFILE=./fetch.res WINDRES=$(WINDRES)
+ $(MAKE) -C ./Example CC=$(CC) fetch RESFILE=./libw3.res WINDRES=$(WINDRES)
./Library/W3Version.h:
m4 -DSUFFIX=\"W\" ./W3Version.h.p > $@