1 rwildcard
=$(foreach d
,$(wildcard $(1:=/*)),$(call rwildcard
,$d,$2) $(filter $(subst *,%,$2),$d))
3 CPPSourceCode
= $(call rwildcard
,Source
,*.
cpp)
4 Objects
= $(patsubst Source
/%.
cpp, Build
/%.o
, $(CPPSourceCode
))
5 Directories
= $(wildcard Source
/*)
7 default
: Library Install Test
9 Build
/%.o
: Source
/%.
cpp
11 @g
++ -c
$^
-std
=c
++2a
-fpic
-pthread
-o
$@
14 @g
++ -shared
-std
=c
++2a
-pthread
-o liblink.so
$(Objects
)
17 @cp liblink.so
/usr
/lib
/
18 @cp
-R Includes
/* /usr
/include/
23 @make
-C Test run
--no-print-directory