Add a regtest to check tasking
[gnadelite.git] / makefile
blobdd020b1cdeaf4e37442ea4dfa2c69d22971046c6
1 ###########################################################################
2 # GnadeLite
4 # Copyright (C) 2006-2008
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.
21 ###########################################################################
23 include mk.config
25 B_DIR=".build/$(shell echo $(MODE) | tr [[:upper:]] [[:lower:]])"
27 APP := $(ADA_PROJECT_PATH)
29 ifeq ($(OS),Windows_NT)
30 export ADA_PROJECT_PATH=$PWD/external-libs/morzhol\;${APP}
31 else
32 export ADA_PROJECT_PATH=$PWD/external-libs/morzhol:${APP}
33 endif
35 all: build
37 build:
38 ifneq ($(INSTALL), "")
39 # Write INSTALL target into mk.install (see install target)
40 $(shell echo $(INSTALL) > mk.install)
41 endif
42 $(GNATMAKE) -Pgnadelite
44 clean:
45 $(GNATCLEAN) -Pgnadelite
47 I_BIN = $(INSTALL)/bin
48 I_INC = $(INSTALL)/include/gnadelite
49 I_INC_G = $(INSTALL)/include/gnadelite/gnade
50 I_LIB = $(INSTALL)/lib/gnadelite
51 I_GPR = $(INSTALL)/lib/gnat
53 install_clean:
54 ifeq ("$(INSTALL)", "")
55 $(error "Wrong install path : empty INSTALL var")
56 endif
57 $(RM) -fr $(I_INC)
58 $(RM) -fr $(I_LIB)
59 $(RM) -f $(I_GPR)/gnadelite.gpr
61 install_dirs: install_clean
62 $(MKDIR) $(I_BIN)
63 $(MKDIR) $(I_INC)
64 $(MKDIR) $(I_INC_G)
65 $(MKDIR) $(I_LIB)
66 $(MKDIR) $(I_GPR)
68 ifeq ("$(INSTALL)", "..")
69 # IF GNAT_ROOT is empty and INSTALL var is not set by the user,
70 # the INSTALL var is equal to ".."
71 # In this case, read INSTALL from mk.install. This file is created
72 # before building
73 install: INSTALL = $(shell cat mk.install)
74 endif
76 install: install_dirs
77 $(CP) src/*.ad[sb] $(I_INC)
78 $(CP) gnade_src/*.ad[sb] $(I_INC_G)
79 $(CP) lib/*.ali $(I_LIB)
80 $(CP) lib/*$(SOEXT) $(I_LIB)
81 $(CP) gpr/*.gpr $(I_GPR)
82 ifeq ($(OS), Windows_NT)
83 $(CP) $(I_LIB)/*$(SOEXT) $(I_LIB)/..
84 endif