File: Makefile.in

package info (click to toggle)
libxmlada1 1.0-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,704 kB
  • ctags: 94
  • sloc: ada: 22,582; sh: 1,804; makefile: 142; xml: 140; perl: 128
file content (90 lines) | stat: -rw-r--r-- 2,289 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
# Generated automatically from Makefile.in by configure.

# Replace with the location for the installation directory
PREFIX=@EXEC_PREFIX@

# Set the following to True to build shared libraries. Note that this will
# not work on most systems, you need to at least compile with -fPIC
BUILD_SHARED=FALSE

GNATMAKE=gnatmake
CC=gcc


  
# List of all modules to compile
# You can remove "dom" if you don't intend to use the DOM interface
MODULES=unicode input_sources sax dom

# Version of the library
MAJOR=0
MINOR=8.1

# Compiler mode: one of "distrib", "debug", "optimize", "profile"
MODE=distrib

FPIC=
CHMOD=chmod
CP=cp -p -f
MKDIR=mkdir -p
RANLIB= @RANLIB@
ARFLAGS=cr
CFLAGS=
CP=cp -p -f
CHMOD=chmod
LN=ln -f -s

#########################################################################
## Nothing to modify below this point
#########################################################################

MODULE_TEST=${MODULES:%=%_test}
MODULE_INSTALL=${MODULES:%=%_inst}

.PHONY: all obj clean install install_dirs

all: obj docs 
obj: ${MODULES}
test: ${MODULE_TEST}

docs: force
	${MAKE} -e -C docs

${MODULES}: force
	${GNATMAKE} ${FPIC} -u -P$@/$@.gpr -XMODE=${MODE}

${MODULE_TEST}: force
	${GNATMAKE} ${FPIC} -P${@:%_test=%}/${@:%_test=%}.gpr -XMODE=debug

${MODULE_INSTALL}: force
	# Build the libraries themselves
	cd ${@:%_inst=%}/obj; ${AR} ${ARFLAGS} libxmlada_${@:%_inst=%}.a *.o
ifneq (${RANLIB}, "")
	cd ${@:%_inst=%}/obj; ${RANLIB} libxmlada_${@:%_inst=%}.a
endif
ifeq (${BUILD_SHARED}, TRUE)
	cd ${@:%_inst=%}/obj; ${CC} -shared -o libxmlada_${@:%_install=%}-${MAJOR}.${MINOR}.so *.o
endif
	#Install the libraries
	${CP} ${@:%_inst=%}/obj/*.ali ${PREFIX}/include/xmlada
	${CP} ${@:%_inst=%}/*.ad[bs]  ${PREFIX}/include/xmlada
	${CP} ${@:%_inst=%}/obj/libxmlada_* ${PREFIX}/lib
ifeq (${BUILD_SHARED}, TRUE)
	cd ${PREFIX}/lib; ${LN} libxmlada_${@:%_inst=%}-${MAJOR}.${MINOR}.so libxmlada_${@:%_inst=%}.so
endif

install_dirs: force
	@${MKDIR} ${PREFIX}/lib
	@${MKDIR} ${PREFIX}/bin
	@${MKDIR} ${PREFIX}/include/xmlada

install: obj install_dirs ${MODULE_INSTALL}
	cd ${PREFIX}/include/xmlada; ${CHMOD} -w *.ali
	${CP} xmlada-config ${PREFIX}/bin
	${CHMOD} +x ${PREFIX}/bin/xmlada-config

clean: force
	-${RM} ${MODULES:%=%/obj/*}  2>/dev/null
	cd docs; ${MAKE} -e clean

force: