forked from epics-base/epics-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
146 lines (127 loc) · 3.45 KB
/
Makefile
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
#
#
# Top Level EPICS Makefile
# by Matthew Needes and Mike Bordua
#
# Notes:
# The build, clean, install, and depends "commands" do not have
# their own dependency lists; they are instead handled by
# the build.%, clean.%, etc. dependencies.
#
# However, the release dependencies DOES require a complete
# install because the release.% syntax is illegal.
#
# $Log$
# Revision 1.23 1995/02/13 15:00:09 jba
# Changed include file from CONFIG_SITE to CONFIG
#
# Revision 1.22 1994/11/14 23:12:17 tang
# Replace ARCH_TYPE with .
#
# Revision 1.1.1.1 1994/11/09 01:08:53 epics
# Import of R3.12.0Beta
#
# Revision 1.18 1994/10/13 19:44:34 mda
# Introduce temporary symbol (ARCH_TYPE=$$ARCH) and use in later targets/rules
# to avoid problem with $* symbol resolution in some versions of gnumake.
#
# Revision 1.17 1994/10/05 18:45:57 jba
# Modified syntax of makefile usage
#
# Revision 1.16 1994/09/09 17:32:27 jba
# Cleanup of files
#
# Revision 1.15 1994/09/08 17:25:39 mcn
# Changed clean to tools/Clean. Added "uninstall" dependency.
#
# Revision 1.14 1994/09/07 20:42:19 jba
# Minor changes
#
# Revision 1.13 1994/09/07 19:15:17 jba
# Modified to eork with extensions and do depends
#
# Revision 1.12 1994/08/21 00:55:51 mcn
# New stuff.
#
# Revision 1.11 1994/08/19 15:38:01 mcn
# Dependencies are now generated with a "make release".
#
# Revision 1.10 1994/08/12 18:51:29 mcn
# Added Log and/or Id.
#
#
EPICS=..
include $(EPICS)/config/CONFIG
all: install
build:
@(for ARCH in ${BUILD_ARCHS}; \
do \
ARCH_TYPE=$$ARCH \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
install:
@(for ARCH in ${BUILD_ARCHS}; \
do \
ARCH_TYPE=$$ARCH \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
depends:
@(for ARCH in ${BUILD_ARCHS}; \
do \
ARCH_TYPE=$$ARCH \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
clean:
@(for ARCH in ${BUILD_ARCHS}; \
do \
ARCH_TYPE=$$ARCH \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
uninstall:
@(for ARCH in ${BUILD_ARCHS}; \
do \
ARCH_TYPE=$$ARCH \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
release:
@echo TOP: Creating Release...
@./MakeRelease ${EPICS}
built_release: install
@echo TOP: Creating Fully Built Release...
@./MakeRelease ${EPICS} -b
# Notes for single architecture build rules:
# CheckArch only has to be run for dirs.% . That
# way it will only be run ONCE when filtering down
# dependencies.
#
# CheckArch does not have to be run for cleans
# because you might want to eliminate binaries for
# an old architecture.
# DIRS RULE syntax: make depends.arch
# e.g.: make depends.mv167
#
# Create dependencies for an architecture. We MUST
# do this separately for each architecture because
# some things may be included on a per architecture
# basis.
build.%:
@echo $*: Building
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs build
install.%:
@echo $*: Installing
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs install
depends.%:
@echo $*: Performing Make Depends
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs depends
# Illegal Syntax
release.%:
@echo
@echo "The release.arch syntax is not supported by this build."
@echo " Use 'make release' or 'make built_release' instead."
@echo
uninstall.%:
@echo "TOP: Uninstalling $* "
@rm -rf ./bin/$* ./lib/$* rec.bak rec
clean.%:
@echo "TOP: Cleaning $* "
@find src -type d -name "O.$*" -prune -exec rm -rf {} \;