Mercurial > mxe-octave
annotate src/gl2ps.mk @ 3295:14d0e2102581
[MSVC] Enable gl2ps compilation.
* src/gl2ps.mk: Use cmake/nmake for compilation with MSVC.
* src/msvc-gl2ps-1.patch: Disable static libraries and fix installation
of import libraries.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Sat, 09 Nov 2013 23:28:04 -0500 |
parents | fbf8f71bf1e6 |
children | 6388d5d08c7c |
rev | line source |
---|---|
3275 | 1 # This file is part of MXE. |
2 # See index.html for further information. | |
3 | |
4 PKG := gl2ps | |
5 $(PKG)_CHECKSUM := 792e11db0fe7a30a4dc4491af5098b047ec378b1 | |
6 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)-source | |
7 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tgz | |
8 $(PKG)_URL := http://geuz.org/$(PKG)/src/$($(PKG)_FILE) | |
9 $(PKG)_DEPS := | |
10 | |
3277
1418183e786b
Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents:
3275
diff
changeset
|
11 |
1418183e786b
Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents:
3275
diff
changeset
|
12 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) |
3295
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
13 ifeq ($(MXE_SYSTEM),msvc) |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
14 $(PKG)_CMAKE_FLAGS := -G 'NMake Makefiles' |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
15 else |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
16 $(PKG)_CMAKE_FLAGS := -G 'MSYS Makefiles' |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
17 endif |
3277
1418183e786b
Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents:
3275
diff
changeset
|
18 else |
1418183e786b
Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents:
3275
diff
changeset
|
19 $(PKG)_CMAKE_FLAGS := \ |
1418183e786b
Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents:
3275
diff
changeset
|
20 -DCMAKE_AR='$(MXE_AR)' \ |
1418183e786b
Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents:
3275
diff
changeset
|
21 -DCMAKE_RANLIB='$(MXE_RANLIB)' |
1418183e786b
Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents:
3275
diff
changeset
|
22 endif |
1418183e786b
Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents:
3275
diff
changeset
|
23 |
3275 | 24 define $(PKG)_UPDATE |
25 echo 'Warning: Updates are temporarily disabled for package octave.' >&2; | |
26 echo $(gl2ps_VERSION) | |
27 endef | |
28 | |
3295
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
29 ifeq ($(MXE_SYSTEM),msvc) |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
30 define $(PKG)_BUILD |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
31 cd '$(1)' && cmake \ |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
32 $($(PKG)_CMAKE_FLAGS) \ |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
33 -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
34 -DPNG_NAMES=png16 \ |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
35 . |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
36 cd '$(1)' && env -u MAKE -u MAKEFLAGS nmake |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
37 cd '$(1)' && env -u MAKE -u MAKEFLAGS nmake DESTDIR='$(3)' install |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
38 endef |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
39 else |
3275 | 40 define $(PKG)_BUILD |
41 cd '$(1)' && cmake \ | |
3277
1418183e786b
Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents:
3275
diff
changeset
|
42 $($(PKG)_CMAKE_FLAGS) \ |
3275 | 43 -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ |
44 . | |
3278
fbf8f71bf1e6
gl2ps: install nativemingw files and bin/dll.
John Donoghue <john.donoghue@ieee.org>
parents:
3277
diff
changeset
|
45 $(MAKE) -C '$(1)' -j '$(JOBS)' VERBOSE=1 |
fbf8f71bf1e6
gl2ps: install nativemingw files and bin/dll.
John Donoghue <john.donoghue@ieee.org>
parents:
3277
diff
changeset
|
46 |
fbf8f71bf1e6
gl2ps: install nativemingw files and bin/dll.
John Donoghue <john.donoghue@ieee.org>
parents:
3277
diff
changeset
|
47 # native mingw build doesnt want to install the files, even |
fbf8f71bf1e6
gl2ps: install nativemingw files and bin/dll.
John Donoghue <john.donoghue@ieee.org>
parents:
3277
diff
changeset
|
48 # though it logs that it did |
fbf8f71bf1e6
gl2ps: install nativemingw files and bin/dll.
John Donoghue <john.donoghue@ieee.org>
parents:
3277
diff
changeset
|
49 if [ x$(MXE_NATIVE_MINGW_BUILD) = xyes ]; then \ |
3295
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
50 $(INSTALL) -m644 '$(1)/libgl2ps.a' '$(3)$(HOST_LIBDIR)'; \ |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
51 $(INSTALL) -m644 '$(1)/libgl2ps.dll.a' '$(3)$(HOST_LIBDIR)'; \ |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
52 $(INSTALL) -m644 '$(1)/libgl2ps.dll' '$(3)$(HOST_BINDIR)'; \ |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
53 $(INSTALL) -m644 '$(1)/gl2ps.h' '$(3)$(HOST_INCDIR)'; \ |
3278
fbf8f71bf1e6
gl2ps: install nativemingw files and bin/dll.
John Donoghue <john.donoghue@ieee.org>
parents:
3277
diff
changeset
|
54 else \ |
3295
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
55 $(MAKE) -C '$(1)' -j 1 VERBOSE=1 DESTDIR='$(3)' install; \ |
3278
fbf8f71bf1e6
gl2ps: install nativemingw files and bin/dll.
John Donoghue <john.donoghue@ieee.org>
parents:
3277
diff
changeset
|
56 if [ $(MXE_SYSTEM) = mingw ]; then \ |
fbf8f71bf1e6
gl2ps: install nativemingw files and bin/dll.
John Donoghue <john.donoghue@ieee.org>
parents:
3277
diff
changeset
|
57 echo "Install dll"; \ |
3295
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
58 $(INSTALL) '$(1)/libgl2ps.dll' '$(3)$(HOST_BINDIR)/'; \ |
3278
fbf8f71bf1e6
gl2ps: install nativemingw files and bin/dll.
John Donoghue <john.donoghue@ieee.org>
parents:
3277
diff
changeset
|
59 fi; \ |
fbf8f71bf1e6
gl2ps: install nativemingw files and bin/dll.
John Donoghue <john.donoghue@ieee.org>
parents:
3277
diff
changeset
|
60 fi |
3275 | 61 endef |
3295
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
62 endif |