Initial revision
[gnadelite.git] / makefile
blob1737535317a23890ac383e0140c44a80d7f1c41b
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 all: build
30 build:
31 $(GNATMAKE) -Pgnadelite
33 clean:
34 $(GNATCLEAN) -Pgnadelite
36 I_BIN = $(INSTALL)/bin
37 I_INC = $(INSTALL)/include/gnadelite
38 I_INC_G = $(INSTALL)/include/gnadelite/gnade
39 I_LIB = $(INSTALL)/lib/gnadelite
40 I_GPR = $(INSTALL)/lib/gnat
42 install_clean:
43 ifeq ("$(INSTALL)", "..")
44 $(error "Wrong install path : INSTALL='$(INSTALL)'")
45 else
46 ifeq ("$(INSTALL)", "")
47 $(error "Wrong install path : empty INSTALL var")
48 endif
49 endif
50 $(RM) -fr $(I_INC)
51 $(RM) -fr $(I_LIB)
52 $(RM) -f $(I_GPR)/gnadelite.gpr
54 install_dirs: install_clean
55 $(MKDIR) $(I_BIN)
56 $(MKDIR) $(I_INC)
57 $(MKDIR) $(I_INC_G)
58 $(MKDIR) $(I_LIB)
59 $(MKDIR) $(I_GPR)
61 install: install_dirs
62 $(CP) src/*.ad[sb] $(I_INC)
63 $(CP) gnade_src/*.ad[sb] $(I_INC_G)
64 $(CP) lib/*.ali $(I_LIB)
65 $(CP) lib/*$(SOEXT) $(I_LIB)
66 $(CP) gpr/*.gpr $(I_GPR)
67 ifeq ($(OS), Windows_NT)
68 $(CP) $(I_LIB)/*$(SOEXT) $(I_LIB)/..
69 endif