File: Makefile.in

package info (click to toggle)
libgtkada 18-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 28,348 kB
  • sloc: ada: 61,514; xml: 7,709; python: 4,310; sh: 2,822; ansic: 1,598; makefile: 240; objc: 160; perl: 70
file content (176 lines) | stat: -rw-r--r-- 5,352 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
SHELL=/bin/sh

.SUFFIXES:
.PHONY: clean-generic mostlyclean-generic \
	clean distclean mostlyclean maintainer-clean \
	install src tests docs generate tools

doc_dir = docs
PYTHON  = python

# This variable can be overridden with "-d" to get progress output
GPRBUILD_OPTIONS=

GPRINSTALL_OPTIONS=

TARGET=@TARGET@
ifeq ($(TARGET),)
GPRBUILD=@GPRBUILD@ $(GPRBUILD_OPTIONS)
GPRINSTALL=@GPRINSTALL@ $(GPRINSTALL_OPTIONS)
else
GPRBUILD=@GPRBUILD@ --target=${TARGET} $(GPRBUILD_OPTIONS)
GPRINSTALL=@GPRINSTALL@ --target=${TARGET} $(GPRINSTALL_OPTIONS)
endif

# Number of parallel compilation
PROCESSORS   = 0

# Location (under $prefix) where the project files should be copied
PRJDIR=lib/gnat

GPRBUILD_FULL = ${GPRBUILD} -j${PROCESSORS} -m -p ${GPRBUILD_SWITCHES}
GPRINSTALL_FULL = ${GPRINSTALL} -p -f --project-subdir=$(PRJDIR) \
	--build-var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada \
	--prefix=${DESTDIR}$(prefix) -XGTK_PREFIX=${prefix}

GETTEXT_INTL=@GETTEXT_INTL@
HAVE_GETTEXT=@HAVE_GETTEXT@
HAVE_OPENGL=@HAVE_OPENGL@
BUILD_SHARED=@BUILD_SHARED@
BUILD_STATIC=@BUILD_STATIC@
BUILD_STATIC_PIC=@BUILD_STATIC_PIC@
TARNAME=@PACKAGE_TARNAME@
VERSION=@PACKAGE_VERSION@
DESTDIR=
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
datadir=@datadir@
datarootdir=@datarootdir@
exampledir=${datadir}/examples/gtkada/testgtk

all:

ifeq (${BUILD_STATIC}, yes)
all tools tests: static
install: install/static
endif

ifeq (${BUILD_STATIC_PIC}, yes)
all tools tests: build_library_type/static-pic
install: install/static-pic
LIBRARY_TYPE_FOR_TOOLS=static-pic
endif

ifeq (${BUILD_SHARED},yes)
all tools tests: relocatable
install: install/relocatable
LIBRARY_TYPE_FOR_TOOLS=relocatable
endif

ifeq (${BUILD_STATIC}, yes)
LIBRARY_TYPE_FOR_TOOLS=static
endif

all: tools tests
static: build_library_type/static
relocatable: build_library_type/relocatable

tools:
	@echo "====== Building tools ====="
	${GPRBUILD_FULL} -XLIBRARY_TYPE=$(LIBRARY_TYPE_FOR_TOOLS) -Psrc/tools/tools.gpr

build_library_type/%:  src/gtkada-intl.adb
	@echo "====== Building $(@F) libraries ====="
	${GPRBUILD_FULL} -XLIBRARY_TYPE=$(@F) -Psrc/gtkada.gpr
ifeq (${HAVE_OPENGL}, True)
	${GPRBUILD_FULL} -XLIBRARY_TYPE=$(@F) -Psrc/opengl/gtkada_gl.gpr
endif

src/gtkada-intl.adb: src/gtkada-intl.gpb Makefile
	gnatprep -DGETTEXT_INTL=$(GETTEXT_INTL) -DHAVE_GETTEXT=$(HAVE_GETTEXT) src/gtkada-intl.gpb $@

testgtk/opengl/view_gl.adb: testgtk/opengl/view_gl.gpb Makefile
	gnatprep -r -c -DHAVE_GL=${HAVE_OPENGL} -DWIN32=False testgtk/opengl/view_gl.gpb $@

tests: testgtk/opengl/view_gl.adb
	@echo "====== Building tests ====="
	cd testgtk; ${GPRBUILD_FULL} -XLIBRARY_TYPE=$(LIBRARY_TYPE_FOR_TOOLS) -Ptestgtk.gpr -aP ../src

install/%: force
	${GPRINSTALL_FULL} -XLIBRARY_TYPE=$(@F) --build-name=$(@F) \
		--sources-subdir=include/gtkada/gtkada.$(@F) \
		--lib-subdir=lib/gtkada/gtkada.$(@F) \
		-Psrc/gtkada.gpr
ifeq (${HAVE_OPENGL}, True)
	${GPRINSTALL_FULL} -XLIBRARY_TYPE=$(@F) --build-name=$(@F) \
		--sources-subdir=include/gtkada/gtkada_gl.$(@F) \
		--lib-subdir=lib/gtkada/gtkada_gl.$(@F) \
		-Psrc/opengl/gtkada_gl.gpr
endif

install-clean:
ifneq (,$(wildcard $(prefix)/lib/gnat/manifests/gtkada))
	-$(GPRINSTALL) --uninstall -f --prefix=$(prefix) \
		--project-subdir=lib/gnat gtkada
endif

install: install-clean
	${GPRINSTALL_FULL} -XLIBRARY_TYPE=$(LIBRARY_TYPE_FOR_TOOLS) \
		--mode=usage -Psrc/tools/tools.gpr
	cd testgtk; ${GPRINSTALL_FULL} -XLIBRARY_TYPE=$(LIBRARY_TYPE_FOR_TOOLS) \
		--mode=usage --exec-subdir=${DESTDIR}${exampledir} \
		-Ptestgtk.gpr -aP ../src

	@echo '-----------------------------------------------------------------------'
	@echo '--  GtkAda has now been installed.                                   --'
	@echo '--  To use the library, you may need to update LD_LIBRARY_PATH       --'
	@echo '--  or to run ldconfig. You may also need to update GPR_PROJECT_PATH --'
	@echo '--  to include                                                       --'
	@echo '--  ${prefix}/lib/gnat'
	@echo '-----------------------------------------------------------------------'

docs:
	$(MAKE) -C docs

# Generate the binding automatically, through a python script
generate:
	${RM} src/generated/*.ad?
	${PYTHON} contrib/binding.py \
	   --gir-file=contrib/GLib-2.0.gir \
	   --gir-file=contrib/GObject-2.0.gir \
		--gir-file=contrib/Gtk-3.0.gir \
		--gir-file=contrib/Gdk-3.0.gir \
		--gir-file=contrib/Pango-1.0.gir \
		--gir-file=contrib/Gio-2.0.gir \
		--xml-file=contrib/binding.xml \
		--ada-output=src/generated/tmp.ada \
		--c-output=src/misc_generated.c
	cd src/generated; /usr/bin/gnatchop -gnat05 -q -w tmp.ada

clean-generic:
	-${RM} .\#*

mostlyclean-generic: clean-generic
	-${RM} Makefile src/config.h shared.gpr
	-${RM} testgtk/opengl/view_gl.adb src/gtkada-intl.adb

clean/%: force
	-gprclean -r -q -XLIBRARY_TYPE=$(@F) -Psrc/tools/tools.gpr
	-gprclean -r -q -XLIBRARY_TYPE=$(@F) -Psrc/opengl/gtkada_gl.gpr
	-gprclean -r -q -XLIBRARY_TYPE=$(@F) -Ptestgtk/testgtk.gpr
	-gprclean -r -q -XLIBRARY_TYPE=$(@F) -Psrc/gtkada.gpr

clean: clean-generic clean/static clean/static-pic clean/relocatable

distclean: clean mostlyclean-generic
	-${RM} config.cache config.log config.status
	-$(MAKE) -C po distclean

mostlyclean: mostlyclean-generic

maintainer-clean: mostlyclean-generic
	-${RM} config.cache config.log config.status
	-${RM} configure

force: