view Makefile.w32 @ 471:4e178dfd0cc3

Fix updating of documentation.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 26 May 2012 07:24:22 +0300
parents b18b97d3e4f5
children 52c56ada3816
line wrap: on
line source

#
# For win32 version cross-compilation with MinGW suite @ Linux
#
SDL=y

# Set PATH to include MinGW cross compiler path FIRST!
PATH=/usr/local/i386-mingw32/bin:/usr/bin:/bin:/usr/local/bin

# C-compiler, flags and linker flags
CC=gcc
CFLAGS=-DHAVE_STRING_H -Ipdcurses -mwindows

# Library path must be defined correctly here
LDFLAGS=-L/usr/local/i386-mingw32/lib/ -liberty -lws2_32 -lole32 -s -mwindows

# Link PDCurses static library here .. you will want to change this
ifeq ($(SDL),y)
LDFLAGS+=pdcurses/libpdcurses-sdl.a -lSDL
else
LDFLAGS+=pdcurses/libpdcurses.a
endif

# Miscellaneous
EXEEXT=.exe
OBJPATH=./win32/
BINPATH=./installer/
#BINPATH=/misc/wine_c/
NONBUILD=$(OBJPATH)

EXTRAOBJS= resource.o
ICON=resource.ico

include Makefile.gen

$(OBJPATH):
	mkdir $@

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 $@


DOC=$(BINPATH)/README.html

update-doc:
	@wget -qO- http://www.tnsp.org/~ccr/nnchat/ | tr '\n' '§' | sed "s/<.-- BEGIN -->.*<.-- END -->//g" | tr '§' '\n' > "$(DOC).new"
	@if diff -u "$(DOC)" "$(DOC).new" > /dev/null; then echo "No differences."; else cp "$(DOC).new" "$(DOC)"; fi

$(DOC): update-doc

upload: $(BINPATH)/nncsetup.msi $(DOC)
	@scp $< ccr@tnsp.org:public_html/nnchat/
	touch $@