1 ##############################################################################
4 ## Copyright (C) 2007 ##
5 ## Pascal Obry - Olivier Ramonat ##
7 ## This library is free software; you can redistribute it and/or modify ##
8 ## it under the terms of the GNU General Public License as published by ##
9 ## the Free Software Foundation; either version 2 of the License, or (at ##
10 ## your option) any later version. ##
12 ## This library is distributed in the hope that it will be useful, but ##
13 ## WITHOUT ANY WARRANTY; without even the implied warranty of ##
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ##
15 ## General Public License for more details. ##
17 ## You should have received a copy of the GNU General Public License ##
18 ## along with this library; if not, write to the Free Software Foundation, ##
19 ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ##
20 ##############################################################################
27 GNAT_ROOT
=$(dir $(shell which gnatls
))..
28 INSTALL
= $(GNAT_ROOT
)
30 # Required for Windows to find the shared library
31 ifeq ($(OS
),Windows_NT
)
32 export PATH
:=$(shell pwd
)/lib
:$(PATH
)
38 ifneq ($(INSTALL
), "")
39 # Write INSTALL target into mk.install (see install target)
40 $(shell echo INSTALL
= $(INSTALL
) > mk.
install)
42 $(GNAT
) make
-p
-XPRJ_BUILD
=$(MODE
) -Pmorzhol
47 $(GNAT
) check -dd
-Pmorzhol
-rules
-from
=morzhol.
check
50 $(GNAT
) make
-p
-Ptest
/test
55 -$(GNAT
) clean -XPRJ_BUILD
=$(MODE
) -q
-Pmorzhol
56 -$(GNAT
) clean -XPRJ_BUILD
=$(MODE
) -q
-Ptest
/test
63 # Set BDIR to .build/#lowercase_mode#
64 install: BDIR
= .build
/$(shell echo
$(MODE
) | tr
[[:upper
:]] [[:lower
:]])
66 ifeq ("$(INSTALL)", "")
67 $(error
"Wrong install path : empty INSTALL var")
69 $(MKDIR
) -p
$(INSTALL
)/include/morzhol
70 $(CP
) src
/*.ad
[sb
] $(INSTALL
)/include/morzhol
71 $(CP
) $(BDIR
)/lib
/* $(INSTALL
)/lib
/morzhol
72 $(CP
) install.gpr
$(INSTALL
)/lib
/gnat
/morzhol.gpr
73 ifeq ($(OS
), Windows_NT
)
74 $(CP
) $(BDIR
)/lib
/*$(SOEXT
) $(INSTALL
)/lib