File: Makefile

package info (click to toggle)
libgtkada 2.24.4dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 12,208 kB
  • ctags: 1,676
  • sloc: ada: 119,686; ansic: 4,719; sh: 3,003; makefile: 690; xml: 338; perl: 70
file content (61 lines) | stat: -rw-r--r-- 1,627 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
#include ../src/Makefile.common

examples=$(prefix)/share/examples/gtkada/

ifeq (${OS},Windows_NT)
DIRSEP=;
else
DIRSEP=:
endif

# Some examples are build with project files, others with gtkada-config, so
# we modify the following two environment variables so that the GtkAda version
# we just installed can be used to compile the examples
export ADA_PROJECT_PATH:=${libdir}/gnat${DIRSEP}${ADA_PROJECT_PATH}
export PATH:=${bindir}:${PATH}

DIRECTORIES=base_widget \
  composite_widget      \
  display_switch        \
  doublebuffer          \
  documentation         \
  dynamic_cast          \
  gtk_examples          \
  tutorial              \
  handlers		         \
  powergnu	          	\
  images                \
  cursors               \
  user_data

TUTORIAL_DIRS=tutorial/gtkdial \
  tutorial/helloworld  \
  tutorial/helloworld2 \
  tutorial/packbox     \
  tutorial/simple      \
  tutorial/table       \
  tutorial/tictactoe

SHELL=sh

all: ${DIRECTORIES}
	@for file in ${DIRECTORIES}; do \
	  make -C $${file} all || exit 1; \
	done

install:
	mkdir -p "${DESTDIR}$(examples)"
	-for dir in ${DIRECTORIES} ${TUTORIAL_DIRS}; do \
	  mkdir -p "${DESTDIR}$(examples)/$${dir}"; \
	  rm -f $${dir}/b~*; \
	  cp -p $${dir}/*.ad? $${dir}/*.gpr "${DESTDIR}$(examples)/$${dir}" 2>/dev/null; \
	  cp -p $${dir}/*.xmp $${dir}/*.png $${dir}/*.tst "${DESTDIR}$(examples)/$${dir}" 2>/dev/null; \
	  cp -p $${dir}/Makefile "${DESTDIR}$(examples)/$${dir}" 2>/dev/null; \
	  cp -p $${dir}/README "${DESTDIR}$(examples)/$${dir}" 2>/dev/null; \
	done

clean::
	@for file in ${DIRECTORIES}; do \
	  make -C $${file} clean; \
	done