1include ../src/Makefile.common
2
3MKDIR = mkdir -p
4
5SOVER=${MAJOR}.${MINOR}
6
7# We want users to be able to override the projects installation directory
8# from the command line, so we cannot include DESTDIR directly here
9# otherwise they have to call make with
10#     make DESTDIR=/foo PRJDIR=/foo/usr/share/gpr
11PRJDIR=${prefix}/lib/gnat
12
13install: force
14	${MKDIR} "${DESTDIR}${PRJDIR}"
15	$(MKDIR) "${DESTDIR}$(libdir)/pkgconfig/"
16	${CP} gtkada.pc "${DESTDIR}$(libdir)/pkgconfig/"
17	-${RM} "${DESTDIR}${prefix}"/projects/gtkada*
18
19	@# We must pass ${libdir} and not ${DESTDIR}${libdir}, since DESTDIR is
20	@# really only a temporary directory for packagers, but the package will
21	@# eventually be installed in ${libdir}.
22	./generate_prj.sh GtkAda ${DEFAULT_LIBRARY_TYPE} ${SOVER} "" "${libdir}"
23	${CP} gtkada.gpr "${DESTDIR}${PRJDIR}"
24
25ifeq ($(HAVE_OPENGL), True)
26	./generate_prj.sh GtkAda_GL ${DEFAULT_LIBRARY_TYPE} ${SOVER} opengl "${libdir}"
27	${CP} gtkada_gl.gpr "${DESTDIR}${PRJDIR}"
28endif
29
30ifeq ($(HAVE_GNOME), True)
31	./generate_prj.sh GtkAda_Gnome ${DEFAULT_LIBRARY_TYPE} ${SOVER} gnome "${libdir}"
32	${CP} gtkada_gnome.gpr "${DESTDIR}${PRJDIR}"
33endif
34
35ifeq ($(OS),Windows_NT)
36	${CP} gtkada_install_*.gpr "${DESTDIR}${incdir}"
37endif
38
39clean: force
40	${RM} *.gpr
41
42force:
43