Skip to content

Commit

Permalink
Make BackupManager, CpuAffinity, and SSLSupport optional
Browse files Browse the repository at this point in the history
If the appropriate flags are not present in the CXXFLAGS, don't
try to build these pieces.
  • Loading branch information
Stuart Eichert committed Jun 7, 2012
1 parent 271ce36 commit 972faef
Showing 1 changed file with 41 additions and 8 deletions.
49 changes: 41 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,38 @@ PLATFORM ?= arm

MOC := ${STAGING_BINDIR_NATIVE}/moc-palm

ifneq (,$(findstring BUILD_BACKUP_MANAGER,$(CXXFLAGS)))
BACKUP_MANAGER_SOURCE=BackupManager.cpp WebKitEventListener.cpp
else
BACKUP_MANAGER_SOURCE=
endif

ifneq (,$(findstring BUILD_CPU_AFFINITY,$(CXXFLAGS)))
CPU_AFFINITY_SOURCE=CpuAffinity.cpp
LIBAFFINITY=-laffinity
else
CPU_AFFINITY_SOURCE=
LIBAFFINITY=
endif

ifneq (,$(findstring USE_CERT_MGR,$(CXXFLAGS)))
LIBCERTMGR=-lPmCertificateMgr
else
LIBCERTMGR=
endif

ifneq (,$(findstring USE_MEMCHUTE,$(CXXFLAGS)))
LIBMEMCHUTE=-lmemchute
else
LIBMEMCHUTE=
endif

ifneq (,$(findstring BUILD_SSL_SUPPORT,$(CXXFLAGS)))
SSL_SUPPORT_SOURCE=SSLSupport.cpp
else
SSL_SUPPORT_SOURCE=
endif

INCLUDES := \
-isystem $(INCLUDE_DIR)/PmCertificateMgr/IncsPublic \
-isystem $(INCLUDE_DIR)/webkit \
Expand All @@ -16,14 +48,16 @@ INCLUDES := \
-I$(INCLUDE_DIR)/WebKitSupplemental \
`pkg-config --cflags glib-2.0`

LIBLUNASERVICE ?= lunaservice

LIBS := \
-laffinity \
$(LIBAFFINITY) \
-lpthread \
-lmemchute \
$(LIBMEMCHUTE) \
-lglib-2.0 \
-llunaservice \
-l$(LIBLUNASERVICE) \
-lpbnjson_cpp \
-lPmCertificateMgr \
$(LIBCERTMGR) \
-lQtGui \
-lQtWebKit \
-lQtNetwork \
Expand Down Expand Up @@ -65,11 +99,10 @@ APP_SOURCES := \
BrowserServerBase.cpp \
BrowserOffscreenQt.cpp \
BrowserPageManager.cpp \
BackupManager.cpp \
CpuAffinity.cpp \
WebKitEventListener.cpp \
$(BACKUP_MANAGER_SOURCE) \
$(CPU_AFFINITY_SOURCE) \
Settings.cpp \
SSLSupport.cpp \
$(SSL_SUPPORT_SOURCE) \
JsonUtils.cpp \
BrowserPage.moc.cpp \
BrowserComboBox.cpp \
Expand Down

0 comments on commit 972faef

Please sign in to comment.