Add in make -s (silent) detection and keep Android builds quiet when run from top level makefile
Fix parallel make for Android example makefiles
This commit is contained in:
parent
1d77a1b981
commit
24c28b061e
1 changed files with 27 additions and 6 deletions
|
|
@ -61,6 +61,27 @@ ISRCS = $(IWRAP:.i=.c)
|
|||
ICXXSRCS = $(IWRAP:.i=.cxx)
|
||||
IOBJS = $(IWRAP:.i=.@OBJEXT@)
|
||||
|
||||
##################################################################
|
||||
# Some options for silent output
|
||||
##################################################################
|
||||
|
||||
ifneq (,$(findstring s, $(filter-out --%, $(MAKEFLAGS))))
|
||||
# make -s detected
|
||||
SILENT=1
|
||||
else
|
||||
SILENT=
|
||||
endif
|
||||
|
||||
ifneq (,$(SILENT))
|
||||
SILENT_OPTION = -s
|
||||
SILENT_PIPE = >/dev/null
|
||||
ANT_QUIET = -q -logfile /dev/null
|
||||
else
|
||||
SILENT_OPTION =
|
||||
SILENT_PIPE =
|
||||
ANT_QUIET =
|
||||
endif
|
||||
|
||||
##################################################################
|
||||
# Dynamic loading for C++
|
||||
# If you are going to be building dynamic loadable modules in C++,
|
||||
|
|
@ -609,20 +630,20 @@ TARGETID = 1
|
|||
# ----------------------------------------------------------------
|
||||
|
||||
android: $(SRCS)
|
||||
$(ANDROID) update project --target $(TARGETID) --name $(PROJECTNAME) --path .
|
||||
$(ANDROID) $(SILENT_OPTION) update project --target $(TARGETID) --name $(PROJECTNAME) --path .
|
||||
$(SWIG) -java $(SWIGOPT) -o $(INTERFACEDIR)$(TARGET)_wrap.c $(INTERFACEPATH)
|
||||
$(ANDROID_NDK_BUILD)
|
||||
$(ANT) debug
|
||||
+$(ANDROID_NDK_BUILD) $(SILENT_PIPE)
|
||||
$(ANT) $(ANT_QUIET) debug
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Build an Android dynamically loadable module (C++)
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
android_cpp: $(SRCS)
|
||||
$(ANDROID) update project --target $(TARGETID) --name $(PROJECTNAME) --path .
|
||||
$(ANDROID) $(SILENT_OPTION) update project --target $(TARGETID) --name $(PROJECTNAME) --path .
|
||||
$(SWIG) -java -c++ $(SWIGOPT) -o $(INTERFACEDIR)$(TARGET)_wrap.cpp $(INTERFACEPATH)
|
||||
$(ANDROID_NDK_BUILD)
|
||||
$(ANT) debug
|
||||
+$(ANDROID_NDK_BUILD) $(SILENT_PIPE)
|
||||
$(ANT) $(ANT_QUIET) debug
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Android install
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue