Makefile (1497B)
1 # 2 # This Source Code Form is subject to the terms of the Mozilla Public 3 # License, v. 2.0. If a copy of the MPL was not distributed with this 4 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 6 include manifest.mn 7 include $(CORE_DEPTH)/coreconf/config.mk 8 9 ifdef BUILD_IDG 10 DEFINES += -DNSSDEBUG 11 endif 12 13 # Needed for compilation of $(OBJDIR)/certdata.c 14 INCLUDES += -I. 15 16 # 17 # To create a loadable module on Darwin, we must use -bundle. 18 # 19 ifeq ($(OS_TARGET),Darwin) 20 DSO_LDOPTS = -bundle 21 endif 22 23 ifdef USE_GCOV 24 DSO_LDOPTS += --coverage 25 endif 26 27 EXTRA_LIBS = \ 28 $(DIST)/lib/$(LIB_PREFIX)nssckfw.$(LIB_SUFFIX) \ 29 $(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \ 30 $(NULL) 31 32 # can't do this in manifest.mn because OS_TARGET isn't defined there. 33 ifeq (,$(filter-out WIN%,$(OS_TARGET))) 34 35 ifdef NS_USE_GCC 36 EXTRA_SHARED_LIBS += \ 37 -L$(NSPR_LIB_DIR) \ 38 -lplc4 \ 39 -lplds4 \ 40 -lnspr4 \ 41 $(NULL) 42 else 43 EXTRA_SHARED_LIBS += \ 44 $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.lib \ 45 $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.lib \ 46 $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \ 47 $(NULL) 48 endif # NS_USE_GCC 49 else 50 51 EXTRA_SHARED_LIBS += \ 52 -L$(NSPR_LIB_DIR) \ 53 -lplc4 \ 54 -lplds4 \ 55 -lnspr4 \ 56 $(NULL) 57 endif 58 59 60 include $(CORE_DEPTH)/coreconf/rules.mk 61 62 # Generate certdata.c. 63 64 # By default, use the unmodified certdata.txt. 65 ifndef NSS_CERTDATA_TXT 66 NSS_CERTDATA_TXT = certdata.txt 67 endif 68 69 $(OBJDIR)/certdata.c: $(NSS_CERTDATA_TXT) certdata.perl | $$(@D)/d 70 $(PERL) certdata.perl $(NSS_CERTDATA_TXT) $@