From: Dirk Hohndel Date: Mon, 24 Oct 2011 19:24:51 +0000 (-0700) Subject: Annotate Makefile with hints about building under Windows X-Git-Url: http://git.tdb.fi/?p=ext%2Fsubsurface.git;a=commitdiff_plain;h=6755d8c271511491b8a23b5e56705beca6fd2822 Annotate Makefile with hints about building under Windows You can build subsurface with MinGW. It requires installing lots of random packages, plus some things still don't work. One is that xml2-config appears to be missing. So this annotates the Makefile to tell a person building under Windows how to work around this. But we can't make this platform conditional as this workaround is hardcoding the install path. Signed-off-by: Dirk Hohndel --- diff --git a/Makefile b/Makefile index 4be5991..cd9fcdd 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,10 @@ endif # about it if it doesn't. LIBUSB = $(shell pkg-config --libs libusb-1.0 2> /dev/null) +# it appears that xml2-config isn't included in the libxml2 package for +# MinGW - so under Windows you may want to replace this with a hardcoded +# path to the installdir - something like +# LIBXML2 = -L/c/opt/gtk/lib -lxml2 LIBXML2 = $(shell xml2-config --libs) LIBGTK = $(shell pkg-config --libs gtk+-2.0 glib-2.0 gconf-2.0) LIBDIVECOMPUTERCFLAGS = -I$(LIBDIVECOMPUTERINCLUDES) @@ -80,6 +84,16 @@ install: $(NAME) $(INSTALL) -d -m 755 $(MANDIR) $(INSTALL) -m 644 $(MANFILES) $(MANDIR) +# it appears that xml2-config isn't included in the libxml2 package for +# MinGW - so under Windows you may want to replace this with a hardcoded +# path to the inclde dir - something like +# +# XML2INCLUDE = -I/c/opt/gtk/include/libxml2 +# +# parse-xml.o: parse-xml.c dive.h +# $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c $(XML2INCLUDE) parse-xml.c + + parse-xml.o: parse-xml.c dive.h $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c `xml2-config --cflags` parse-xml.c