changeset 213:78f47ae47c2a

Fix Windows build.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 21 Nov 2010 00:18:59 +0200
parents f474ea264a5b
children da539f54c9b0
files Makefile.gen Makefile.w32
diffstat 2 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.gen	Sat Nov 20 23:13:41 2010 +0200
+++ b/Makefile.gen	Sun Nov 21 00:18:59 2010 +0200
@@ -1,10 +1,16 @@
-NN_VERSION := `cat VERSION`
 
 CFLAGS+=-g -W -Wall -O2 -DTH_NO_DEFAULTS
 #CFLAGS+=-g -W -Wall -DTH_NO_DEFAULTS
 COMP=$(CC) $(CFLAGS)
 
 #
+# Version strings
+#
+NN_VERSION := $(shell cat VERSION)
+comma:= ,
+NN_VERSION_COM := $(subst .,$(comma),$(NN_VERSION))
+
+#
 # Objects
 #
 NNCHAT_BIN=$(BINPATH)nnchat$(EXEEXT)
--- a/Makefile.w32	Sat Nov 20 23:13:41 2010 +0200
+++ b/Makefile.w32	Sun Nov 21 00:18:59 2010 +0200
@@ -35,10 +35,8 @@
 $(OBJPATH):
 	mkdir $@
 
-comma:= ,
-
-resource.rc: resource.rc.in $(ICON)
-	sed -e "s/@VERSION@/$(NN_VERSION)/g;s/@VERSION_COM@/$(subst .,$(comma),$(NN_VERSION))/g;s/@ICON@/$(ICON)/g;s#@EXE@#$(notdir $(NNCHAT_BIN))#g" < $< > $@
+resource.rc: resource.rc.in $(ICON) VERSION
+	sed -e "s/@VERSION@/$(NN_VERSION)/g;s/@VERSION_COM@/$(NN_VERSION_COM)/g;s/@ICON@/$(ICON)/g;s#@EXE@#$(notdir $(NNCHAT_BIN))#g" < $< > $@
 
 resource.o: resource.rc
 	i386-mingw32-windres $< -O coff -o $@