view Makefile.w32 @ 709:144bdfca82d1 default tip

Build system improvement.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 25 Feb 2022 15:26:06 +0200
parents f1df1cf69a38
children
line wrap: on
line source

#
# For win32 version cross-compilation with MinGW suite @ Linux
#
BINTOOL_PREFIX = i686-w64-mingw32-

PREFIX  = ./win32/
BINPATH = ./installer/
OBJPATH = ./obj/win32/
BINEXT  = .exe
INSTALL = 
DOC     = $(BINPATH)/README.html

WINDRES ?= $(BINTOOL_PREFIX)windres

CFLAGS += -DHAVE_STRING_H -Ipdcurses -mwindows -DTH_BYTEORDER=TH_LITTLE_ENDIAN -D_NO_BOOL_TYPEDEF
LDFLAGS += -lws2_32 -lole32 -mwindows pdcurses/libpdcurses.a -s

###
### Miscellaneous
###
EXTRAOBJS = resource.o
ICON = resource.ico

include Makefile.gen

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
	$(WINDRES) $< -O coff -o $@