-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
42 lines (37 loc) · 1004 Bytes
/
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
# OpenCV based Image Processing Algorithm.
# GitHub: techping
# The top level Makefile.
CXX = g++
OPENCV_LIBS = $(shell pkg-config --cflags --libs opencv)
export CXX OPENCV_LIBS
subdirs = $(shell find src/ -maxdepth 1 -type d)
dirs = $(filter-out src/, ${subdirs})
.PHONY: all clean
all:
@if [ ! -n "${PACKAGE}" ]; then \
echo "No $\{PACKAGE} environmet found. Compile all..."; \
for dir in ${dirs}; do \
${MAKE} -C $$dir; \
done \
else \
if [ -d src/${PACKAGE} ]; then \
echo "Compile ${PACKAGE}..."; \
${MAKE} -C src/${PACKAGE}; \
else \
echo "Source code for '${PACKAGE}' is not existed. Exit."; \
fi \
fi
clean:
@if [ ! -n "${PACKAGE}" ]; then \
echo "No $\{PACKAGE} environmet found. Clean all..."; \
for dir in ${dirs}; do \
${MAKE} -C $$dir clean; \
done \
else \
if [ -d src/${PACKAGE} ]; then \
echo "Clean ${PACKAGE}..."; \
${MAKE} -C src/${PACKAGE} clean; \
else \
echo "Source code for '${PACKAGE}' is not existed. Exit."; \
fi \
fi