tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Makefile (1921B)


      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 
      8 include $(CORE_DEPTH)/coreconf/config.mk
      9 
     10 ifdef BUILD_IDG
     11 DEFINES += -DNSSDEBUG
     12 endif
     13 
     14 # Needed for compilation of $(OBJDIR)/certdata.c
     15 INCLUDES += -I.
     16 
     17 #
     18 # To create a loadable module on Darwin, we must use -bundle.
     19 #
     20 ifeq ($(OS_TARGET),Darwin)
     21 DSO_LDOPTS = -bundle
     22 endif
     23 
     24 ifdef USE_GCOV
     25 DSO_LDOPTS += --coverage
     26 endif
     27 
     28 EXTRA_LIBS =                                       \
     29 $(DIST)/lib/$(LIB_PREFIX)nssckfw.$(LIB_SUFFIX) \
     30 $(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX)    \
     31 $(NULL)
     32 
     33 # If the OS_TARGET is WIN%, the path of shared libs could be different.
     34 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
     35 # If using GCC, just inform the name of the libs.
     36 ifdef NS_USE_GCC
     37 EXTRA_SHARED_LIBS +=  \
     38 -L$(NSPR_LIB_DIR) \
     39 -lplc4            \
     40 -lplds4           \
     41 -lnspr4           \
     42 $(NULL)
     43 else # NS_USE_GCC - If not using GCC, inform the absolute path.
     44 EXTRA_SHARED_LIBS += 				\
     45 $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.lib  \
     46 $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.lib \
     47 $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \
     48 $(NULL)
     49 endif # NS_USE_GCC
     50 else # OS_TARGET != WIN
     51 EXTRA_SHARED_LIBS +=  \
     52 -L$(NSPR_LIB_DIR) \
     53 -lplc4            \
     54 -lplds4           \
     55 -lnspr4           \
     56 $(NULL)
     57 endif # OS_TARGET
     58 
     59 SIMPLE_OBJS   = $(notdir $(CSRCS:.c=$(OBJ_SUFFIX)))
     60 OBJS          = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(SIMPLE_OBJS))
     61 vpath %c $(dir $(CSRCS)) # $(OBJDIR)
     62 
     63 
     64 include $(CORE_DEPTH)/coreconf/rules.mk
     65 
     66 CFLAGS += -I$(CORE_DEPTH)/lib/ckfw/builtins
     67 
     68 # Generate certdata-testlib.c.
     69 ifndef NSS_CERTDATA-TESTLIB_TXT
     70 NSS_CERTDATA-TESTLIB_TXT = certdata-testlib.txt
     71 endif
     72 
     73 $(OBJDIR)/certdata-testlib.c: $(NSS_CERTDATA-TESTLIB_TXT) | $$(@D)/d
     74 $(PERL) ../certdata.perl $(NSS_CERTDATA-TESTLIB_TXT) $@