annotate src/cfitsio.mk @ 3182:23a5b6df3061

Update cfitsio for mingw build * src/cfitsio.mk: Add build rule for non msvc targets * src/mingw-cfitsio-1-fixes.patch: New file
author John Donoghue <john.donoghue@ieee.org>
date Sat, 27 Jul 2013 19:49:58 -0400
parents 18c5fa5ce861
children 579d71e16ab2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3163
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
1 # This file is part of MXE.
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
2 # See index.html for further information.
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
3
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
4 PKG := cfitsio
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
5 $(PKG)_IGNORE :=
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
6 $(PKG)_CHECKSUM := 4870380013d089e1e9b8994d74f15482decffc1c
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
7 $(PKG)_SUBDIR := $(PKG)
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
8 $(PKG)_FILE := $(PKG)$(subst .,,$($(PKG)_VERSION)).tar.gz
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
9 $(PKG)_URL := ftp://heasarc.gsfc.nasa.gov/software/$(PKG)/c/$($(PKG)_FILE)
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
10 $(PKG)_DEPS :=
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
11
3182
23a5b6df3061 Update cfitsio for mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3163
diff changeset
12 $(PKG)_MAKE_FLAGS :=
23a5b6df3061 Update cfitsio for mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3163
diff changeset
13 ifeq ($(BUILD_SHARED),yes)
23a5b6df3061 Update cfitsio for mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3163
diff changeset
14 $(PKG)_MAKE_FLAGS += shared
23a5b6df3061 Update cfitsio for mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3163
diff changeset
15 endif
23a5b6df3061 Update cfitsio for mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3163
diff changeset
16
3163
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
17 define $(PKG)_UPDATE
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
18 echo 'Warning: Updates are temporarily disabled for package cfitsio.' >&2;
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
19 echo $(cfitsio_VERSION)
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
20 endef
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
21
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
22 ifeq ($(MXE_SYSTEM),msvc)
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
23 define $(PKG)_BUILD
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
24 $(SED) -i 's/cfitsio\.dll/$(LIBRARY_PREFIX)cfitsio$(LIBRARY_SUFFIX).dll/g' '$(1)/makefile.vcc'
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
25 cd '$(1)' && env -u MAKE -u MAKEFLAGS nmake -f makefile.vcc
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
26 $(SED) -e 's#@prefix@#$(HOST_PREFIX)#' \
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
27 -e 's#@exec_prefix@#$${prefix}#' \
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
28 -e 's#@libdir@#$${exec_prefix}/lib#' \
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
29 -e 's#@includedir@#$${prefix}/include#' \
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
30 -e 's#@LIBS@##' \
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
31 -e '/^Libs\.private:/ { s#-lm\>##; }' \
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
32 -e 's#@CFITSIO_MAJOR@#$(word 1,$(subst ., ,$($(PKG)_VERSION)))#' \
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
33 -e 's#@CFITSIO_MINOR@#$(word 2,$(subst ., ,$($(PKG)_VERSION)))#' \
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
34 '$(1)/cfitsio.pc.in' > '$(1)/cfitsio.pc'
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
35 $(INSTALL) -d '$(HOST_BINDIR)'
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
36 $(INSTALL) '$(1)/$(LIBRARY_PREFIX)cfitsio$(LIBRARY_SUFFIX).dll' '$(HOST_BINDIR)'
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
37 $(INSTALL) -d '$(HOST_LIBDIR)'
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
38 $(INSTALL) '$(1)/cfitsio.lib' '$(HOST_LIBDIR)'
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
39 $(INSTALL) -d '$(HOST_LIBDIR)/pkgconfig'
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
40 $(INSTALL) '$(1)/cfitsio.pc' '$(HOST_LIBDIR)/pkgconfig'
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
41 $(INSTALL) -d '$(HOST_INCDIR)'
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
42 for f in fitsio.h fitsio2.h longnam.h drvrsmem.h; do \
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
43 $(INSTALL) "$(1)/$$f" '$(HOST_INCDIR)'; \
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
44 done
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
45 endef
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
46 else
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
47 define $(PKG)_BUILD
3182
23a5b6df3061 Update cfitsio for mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3163
diff changeset
48 cd '$(1)' && '$(1)/configure' \
23a5b6df3061 Update cfitsio for mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3163
diff changeset
49 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
23a5b6df3061 Update cfitsio for mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3163
diff changeset
50 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
23a5b6df3061 Update cfitsio for mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3163
diff changeset
51 --prefix='$(HOST_PREFIX)'
23a5b6df3061 Update cfitsio for mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3163
diff changeset
52 $(MAKE) -C '$(1)' -j '$(JOBS)' $($(PKG)_MAKE_FLAGS)
23a5b6df3061 Update cfitsio for mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3163
diff changeset
53 $(MAKE) -C '$(1)' -j 1 install
23a5b6df3061 Update cfitsio for mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3163
diff changeset
54
3163
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
55 endef
18c5fa5ce861 Add CFITSIO module (currently only compiles with MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
56 endif