(Last_Insert_Rowid) : Skip first whitespace returned by 'Image
[gnadelite.git] / makefile
blob3115fe9154500ebe496a8c347ede90631a590cd3
1 ###########################################################################
2 # GnadeLite
4 # Copyright (C) 2006-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.
21 # Simple makefile to build Vision2Pixels
22 ###########################################################################
24 include mk.config
26 B_DIR=".build/$(shell echo $(MODE) | tr [[:upper:]] [[:lower:]])"
28 ifeq ($(OS),Windows_NT)
29 export ADA_PROJECT_PATH=$PWD/external-libs/morzhol\;$ADA_PROJECT_PATH
30 else
31 export ADA_PROJECT_PATH=$PWD/external-libs/morzhol:$ADA_PROJECT_PATH
32 endif
34 all: build
36 build:
37 ifneq ($(INSTALL), "")
38 # Write INSTALL target into mk.install (see install target)
39 $(shell echo $(INSTALL) > mk.install)
40 endif
41 $(GNATMAKE) -Pgnadelite
43 clean:
44 $(GNATCLEAN) -Pgnadelite
46 I_BIN = $(INSTALL)/bin
47 I_INC = $(INSTALL)/include/gnadelite
48 I_INC_G = $(INSTALL)/include/gnadelite/gnade
49 I_LIB = $(INSTALL)/lib/gnadelite
50 I_GPR = $(INSTALL)/lib/gnat
52 install_clean:
53 ifeq ("$(INSTALL)", "")
54 $(error "Wrong install path : empty INSTALL var")
55 endif
56 $(RM) -fr $(I_INC)
57 $(RM) -fr $(I_LIB)
58 $(RM) -f $(I_GPR)/gnadelite.gpr
60 install_dirs: install_clean
61 $(MKDIR) $(I_BIN)
62 $(MKDIR) $(I_INC)
63 $(MKDIR) $(I_INC_G)
64 $(MKDIR) $(I_LIB)
65 $(MKDIR) $(I_GPR)
67 ifeq ("$(INSTALL)", "..")
68 # IF GNAT_ROOT is empty and INSTALL var is not set by the user,
69 # the INSTALL var is equal to ".."
70 # In this case, read INSTALL from mk.install. This file is created
71 # before building
72 install: INSTALL = $(shell cat mk.install)
73 endif
75 install: install_dirs
76 $(CP) src/*.ad[sb] $(I_INC)
77 $(CP) gnade_src/*.ad[sb] $(I_INC_G)
78 $(CP) lib/*.ali $(I_LIB)
79 $(CP) lib/*$(SOEXT) $(I_LIB)
80 $(CP) gpr/*.gpr $(I_GPR)
81 ifeq ($(OS), Windows_NT)
82 $(CP) $(I_LIB)/*$(SOEXT) $(I_LIB)/..
83 endif