-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathMakefile.vms
More file actions
95 lines (77 loc) · 2.56 KB
/
Copy pathMakefile.vms
File metadata and controls
95 lines (77 loc) · 2.56 KB
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
# Generated automatically from Makefile.in by configure.
# Replace with the location for the installation directory
PREFIX=tmp
# 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
# Compiler mode: one of "distrib", "debug", "optimize", "profile"
MODE=distrib
FPIC=
CHMOD=chmod
CP=cp -p -f
MKDIR=mkdir -p
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
obj: ${MODULES}
test: ${MODULE_TEST}
${MODULES}: force
# The following four lines are a workaround for a bug in GNAT 3.15a1
# Since logical names are not automatically reset the a command exits
assign/job tmp ADA_INCLUDE_PATH
deassign/job ADA_INCLUDE_PATH
assign/job tmp ADA_OBJECTS_PATH
deassign/job ADA_OBJECTS_PATH
${GNATMAKE} ${FPIC} -u -P$@/$@.gpr -XMODE=${MODE}
${MODULE_TEST}: force
assign/job tmp ADA_INCLUDE_PATH
deassign/job ADA_INCLUDE_PATH
assign/job tmp ADA_OBJECTS_PATH
deassign/job ADA_OBJECTS_PATH
${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: