Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 1357319 - Add proper Makefile for cpputil r=mt
  • Loading branch information
Tim Taubert committed Jun 8, 2017
1 parent 26c3279 commit 02a9a2f
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 6 deletions.
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -28,6 +28,7 @@ include $(CORE_DEPTH)/coreconf/config.mk

ifdef NSS_DISABLE_GTESTS
DIRS := $(filter-out gtests,$(DIRS))
DIRS := $(filter-out cpputil,$(DIRS))
endif

#######################################################################
Expand Down
49 changes: 49 additions & 0 deletions cpputil/Makefile
@@ -0,0 +1,49 @@
#! gmake
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY). #
#######################################################################

include manifest.mn

#######################################################################
# (2) Include "global" configuration information. (OPTIONAL) #
#######################################################################

include $(CORE_DEPTH)/coreconf/config.mk

#######################################################################
# (3) Include "component" configuration information. (OPTIONAL) #
#######################################################################

ifeq (WINNT,$(OS_ARCH))
OS_CFLAGS += -EHsc
else
CXXFLAGS += -std=c++0x
endif

#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################

include config.mk

#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
#######################################################################

include $(CORE_DEPTH)/coreconf/rules.mk

#######################################################################
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################



#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
15 changes: 15 additions & 0 deletions cpputil/config.mk
@@ -0,0 +1,15 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

#
# Override TARGETS variable so that only static libraries
# are specifed as dependencies within rules.mk.
#

TARGETS = $(LIBRARY)
SHARED_LIBRARY =
IMPORT_LIBRARY =
PROGRAM =

18 changes: 18 additions & 0 deletions cpputil/manifest.mn
@@ -0,0 +1,18 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
CORE_DEPTH = ..
DEPTH = ..

MODULE = nss
LIBRARY_NAME = cpputil

CPPSRCS = \
dummy_io.cc \
dummy_io_fwd.cc \
tls_parser.cc \
$(NULL)

EXPORTS = \
$(NULL)
10 changes: 5 additions & 5 deletions gtests/ssl_gtest/manifest.mn
Expand Up @@ -12,9 +12,6 @@ CSRCS = \
$(NULL)

CPPSRCS = \
$(CORE_DEPTH)/cpputil/dummy_io.cc \
$(CORE_DEPTH)/cpputil/dummy_io_fwd.cc \
$(CORE_DEPTH)/cpputil/tls_parser.cc \
ssl_0rtt_unittest.cc \
ssl_agent_unittest.cc \
ssl_auth_unittest.cc \
Expand Down Expand Up @@ -53,9 +50,12 @@ INCLUDES += -I$(CORE_DEPTH)/gtests/google_test/gtest/include \
-I$(CORE_DEPTH)/gtests/common \
-I$(CORE_DEPTH)/cpputil

REQUIRES = nspr nss libdbm gtest
REQUIRES = nspr nss libdbm gtest cpputil

PROGRAM = ssl_gtest
EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX)
EXTRA_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)cpputil.$(LIB_SUFFIX) \
$(NULL)

USE_STATIC_LIBS = 1
2 changes: 1 addition & 1 deletion manifest.mn
Expand Up @@ -10,4 +10,4 @@ IMPORTS = nspr20/v4.8 \

RELEASE = nss

DIRS = coreconf lib cmd gtests
DIRS = coreconf lib cmd cpputil gtests

0 comments on commit 02a9a2f

Please sign in to comment.