summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcls%seawood.org <devnull@localhost>1999-06-22 08:12:41 +0000
committercls%seawood.org <devnull@localhost>1999-06-22 08:12:41 +0000
commit152f1d0c21866d8ac445942ee7348f53cb235e2c (patch)
treeaa82c1a17a723548e50432e21bd31795309a31ad
parente6f3ef2bbe7cb989d549d7daeccd13c967fd0e76 (diff)
downloadnspr-hg-152f1d0c21866d8ac445942ee7348f53cb235e2c.tar.gz
Add ifdefs for using autoconf. Designed with cross-compiling as a secondary objective.
-rw-r--r--config/config.mk60
1 files changed, 60 insertions, 0 deletions
diff --git a/config/config.mk b/config/config.mk
index 45fdf764..0c79464b 100644
--- a/config/config.mk
+++ b/config/config.mk
@@ -32,6 +32,64 @@ NSPR_CONFIG_MK = 1
# USE_PTHREADS=1
# NS_USE_GCC=
#
+ifdef USE_AUTOCONF
+
+NFSPWD = $(MOD_DEPTH)/config/nfspwd
+
+CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
+ $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
+CCCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
+ $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
+# For purify
+NOMD_CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
+ $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
+NOMD_CCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
+ $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
+
+DIST = $(MOD_DEPTH)/dist/$(OBJDIR_NAME)
+
+
+NSINSTALL = $(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall
+
+ifeq ($(NSDISTMODE),copy)
+# copy files, but preserve source mtime
+INSTALL = $(NSINSTALL) -t
+else
+ifeq ($(NSDISTMODE),absolute_symlink)
+# install using absolute symbolic links
+INSTALL = $(NSINSTALL) -L `$(NFSPWD)`
+else
+# install using relative symbolic links
+INSTALL = $(NSINSTALL) -R
+endif
+endif
+
+ifdef BUILD_DEBUG_GC
+DEFINES += -DDEBUG_GC
+endif
+
+GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
+
+DEFINES += -DFORCE_PR_LOG
+
+ifeq ($(_PR_NO_CLOCK_TIMER),1)
+DEFINES += -D_PR_NO_CLOCK_TIMER
+endif
+
+ifeq ($(USE_PTHREADS), 1)
+DEFINES += -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM
+endif
+
+ifeq ($(PTHREADS_USER), 1)
+DEFINES += -DPTHREADS_USER -UHAVE_CVAR_BUILT_ON_SEM
+endif
+
+ifeq ($(USE_IPV6),1)
+DEFINES += -D_PR_INET6
+endif
+
+else # ! USE_AUTOCONF
+
ifndef NSPR_MY_CONFIG_MK
NSPR_MY_CONFIG_MK = $(MOD_DEPTH)/config/my_config.mk
endif
@@ -142,3 +200,5 @@ RELEASE_BIN_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/bin
RELEASE_LIB_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/lib
-include $(NSPR_MY_OVERRIDES_MK)
+
+endif # USE_AUTOCONF \ No newline at end of file