-
Notifications
You must be signed in to change notification settings - Fork 85
/
Makefile
103 lines (78 loc) · 1.69 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
#
# Top-level Makefile for IPP sample implementations.
#
# Copyright © 2014-2024 by the Printer Working Group.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
# information.
#
include Makedefs
# Source directories...
DIRS = \
libcups/cups \
libcups/pdfio \
libcups/tools \
server \
tools
#
# Make all targets...
#
all:
for dir in $(DIRS); do \
if test -f $$dir/Makefile; then \
echo "======== all in $$dir ========"; \
(cd $$dir; $(MAKE) $(MFLAGS) all) || exit 1; \
fi; \
done
#
# Remove object and target files...
#
clean:
for dir in $(DIRS); do \
if test -f $$dir/Makefile; then \
echo "======== clean in $$dir ========"; \
(cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1; \
fi; \
done
#
# Remove all non-distribution files...
#
distclean: clean
$(RM) Makedefs config.h config.log config.status
-$(RM) -r autom4te*.cache
(cd libcups; make distclean)
#
# Make dependencies
#
depend:
for dir in server tools; do \
echo "======== depend in $$dir ========"; \
(cd $$dir; $(MAKE) $(MFLAGS) depend) || exit 1; \
done
#
# Install everything...
#
install:
for dir in $(DIRS) examples man; do \
if test -f $$dir/Makefile; then \
echo "======== install in $$dir ========"; \
(cd $$dir; $(MAKE) $(MFLAGS) prefix=$(prefix) install) || exit 1; \
fi; \
done
#
# Test everything...
#
.PHONY: test
test:
for dir in $(DIRS); do \
if test -f $$dir/Makefile; then \
echo "======== test in $$dir ========"; \
(cd $$dir; $(MAKE) $(MFLAGS) CFLAGS="$(CFLAGS)" COMMONFLAGS="$(OPTIM)" test) || exit 1; \
fi; \
done
echo "Running integration tests..."
test/run-tests.sh
#
# Don't run top-level build targets in parallel...
#
.NOTPARALLEL: