]> Nishi Git Mirror - libw3.git/commitdiff
fixing the makefile
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Wed, 31 Jan 2024 11:34:58 +0000 (11:34 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Wed, 31 Jan 2024 11:34:58 +0000 (11:34 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@144 d27a3e52-49c5-7645-884c-6793ebffc270

Makefile

index 6b686505044c72383ea0d85cec39a07fa3ac879a..03a656ebccdebb1af315d60d030dcff03287b4be 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ CFLAGS := -g -std=c99 -fPIC -D_XOPEN_SOURCE=600
 LDFLAGS :=
 LIBS :=
 PREFIX := /usr/local
-VERSION = $(shell cat Library/W3Version.h | $(GREP) -m 1 LIBW3_VERSION | sed -E "s/.+\"([^\"]+)\".+/\1/g")$(shell cat Library/W3Version.h | grep -A 1 -Eo "LIBW3_VERSION" | tail -n1 | grep -Eo "W")
+VERSION = $(shell cat Library/W3Version.h | $(GREP) -m 1 LIBW3_VERSION | sed -E "s/.+\"([^\"]+)\".+/\1/g")$(shell cat Library/W3Version.h | grep -A 1 -Eo "LIBW3_VERSION" | sed "s/LIBW3_VERSION//g" | tail -n1 | grep -Eo "W")
 
 
 ifeq ($(SSL),YES)
@@ -54,7 +54,7 @@ ifeq ($(WINDOWS),YES)
 
 ALL := ./Library/w3.dll ./Example
 
-all: ./w3.pc ./Library/W3Version.h $(ALL)
+all: ./Library/W3Version.h ./w3.pc $(ALL)
 
 ./Library/w3.dll:
        $(MAKE) -C ./Library CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" WINDOWS=YES
@@ -71,7 +71,7 @@ else
 
 ALL := ./Library/libw3.so ./Library/libw3.a ./Example
 
-all: ./w3.pc ./Library/W3Version.h $(ALL)
+all: ./Library/W3Version.h ./w3.pc $(ALL)
 
 ./Library/libw3.so:
        $(MAKE) -C ./Library CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" ./libw3.so
@@ -117,7 +117,7 @@ archive: all
        mkdir -p w3-$(VERSION)/Example/interactive
        mkdir -p w3-$(VERSION)/Example/fetch
        cp -rf ./Library/*.h w3-$(VERSION)/Library/
-ifdef WINDOWS
+ifeq ($(WINDOWS),YES)
        cp ./Library/*.lib w3-$(VERSION)/Library/
        cp ./Library/*.dll w3-$(VERSION)/Library/
        cp ./Example/fetch/fetch.exe w3-$(VERSION)/Example/fetch/