--- /dev/null
+.PHONY: clean install
+
+./w3b: ./w3b.c $(RESFILE)
+ $(CC) -o $@ -I ../../Library -L ../../Library $^ -lw3
+
+../libw3.res:
+ $(MAKE) -C .. ./libw3.res WINDRES=$(WINDRES)
+
+clean:
+ rm -f w3b *.o *.so *.core *~ *.exe *.res
+
+install: ./w3b
+ mkdir -p $(PREFIX)/bin
+ cp ./w3b $(PREFIX)/bin/w3b
.PHONY: clean install
./fetch: ./fetch.c $(RESFILE)
- $(CC) -o $@ -I ../Library -L ../Library $^ -lw3
+ $(CC) -o $@ -I ../../Library -L ../../Library $^ -lw3
-./libw3.res: ./libw3.rc
- $(WINDRES) $< -O coff -o $@
+../libw3.res:
+ $(MAKE) -C .. ./libw3.res WINDRES=$(WINDRES)
clean:
rm -f fetch *.o *.so *.core *~ *.exe *.res
$(MAKE) -C ./Library CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" WINDOWS=YES
./Example: ./Library/w3.dll
- $(MAKE) -C ./Example CC=$(CC) RESFILE=./libw3.res WINDRES=$(WINDRES) WINDOWS=YES
- $(MAKE) -C ./Example/W3B CC=$(CC) RESFILE=./libw3.res WINDRES=$(WINDRES) WINDOWS=YES
+ $(MAKE) -C ./Example/fetch CC=$(CC) RESFILE=../libw3.res WINDRES=$(WINDRES) WINDOWS=YES
+ $(MAKE) -C ./Example/W3B CC=$(CC) RESFILE=../libw3.res WINDRES=$(WINDRES) WINDOWS=YES
./Library/W3Version.h:
m4 -DSUFFIX=\"W\" ./W3Version.h.p > $@
$(MAKE) -C ./Library CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" ./libw3.a
./Example: ./Library/libw3.so
- $(MAKE) -C ./Example CC=$(CC)
- $(MAKE) -C ./Example/W3B CC=$(CC) RESFILE=./libw3.res WINDRES=$(WINDRES) WINDOWS=YES
+ $(MAKE) -C ./Example/fetch CC=$(CC)
+ $(MAKE) -C ./Example/W3B CC=$(CC)
./Library/W3Version.h:
m4 -DSUFFIX=\"\" ./W3Version.h.p > $@
-rm ./w3.pc w3-*.zip w3-*.tar.gz w3-*.lzh ./Library/W3Version.h
$(MAKE) -C ./Library clean
$(MAKE) -C ./Example clean
+ $(MAKE) -C ./Example/fetch clean
+ $(MAKE) -C ./Example/W3B clean
install: ./w3.pc
$(MAKE) -C ./Library install PREFIX=$(PREFIX)