From befd0ecfd9e481fbc9233722b94d18b50fe8b26a Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Fri, 30 Mar 2012 13:58:55 +0000 Subject: [PATCH] Fixing -ldl flags for Linux build. --- Makefile | 24 ------------------------ Makefile.libs | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index fb5d352a..26532ef3 100644 --- a/Makefile +++ b/Makefile @@ -14,30 +14,6 @@ GENSTATIC ?= ./tools/chibi-genstatic CHIBI ?= LD_LIBRARY_PATH=".:$(LD_LIBRARY_PATH)" ./chibi-scheme$(EXE) CHIBI_DEPENDENCIES = ./chibi-scheme$(EXE) -######################################################################## -# Library config. -# -# This is to allow "make SEXP_USE_BOEHM=1" and "make SEXP_USE_DL=0" to -# automatically include the necessary compiler and linker flags in -# addition to setting those features. If not using GNU make just -# comment out the ifs and use the else branches for the defaults. - -ifeq ($(SEXP_USE_BOEHM),1) -GCLDFLAGS := -lgc -XCPPFLAGS := $(CPPFLAGS) -Iinclude $(D:%=-DSEXP_USE_%) -DSEXP_USE_BOEHM=1 -else -GCLDFLAGS := -XCPPFLAGS := $(CPPFLAGS) -Iinclude $(D:%=-DSEXP_USE_%) -endif - -ifeq ($(SEXP_USE_DL),0) -XLDFLAGS := $(LDFLAGS) $(RLDFLAGS) $(GCLDFLAGS) -lm -XCFLAGS := -Wall -DSEXP_USE_DL=0 -g -g3 -Os $(CFLAGS) -else -XLDFLAGS := $(LDFLAGS) $(RLDFLAGS) $(GCLDFLAGS) $(LIBDL) -lm -XCFLAGS := -Wall -g -g3 -Os $(CFLAGS) -endif - ######################################################################## CHIBI_COMPILED_LIBS = lib/chibi/filesystem$(SO) lib/chibi/process$(SO) \ diff --git a/Makefile.libs b/Makefile.libs index 6767d386..4c186282 100644 --- a/Makefile.libs +++ b/Makefile.libs @@ -42,6 +42,30 @@ CHIBI_DOC ?= chibi-doc include Makefile.detect +######################################################################## +# Library config. +# +# This is to allow "make SEXP_USE_BOEHM=1" and "make SEXP_USE_DL=0" to +# automatically include the necessary compiler and linker flags in +# addition to setting those features. If not using GNU make just +# comment out the ifs and use the else branches for the defaults. + +ifeq ($(SEXP_USE_BOEHM),1) +GCLDFLAGS := -lgc +XCPPFLAGS := $(CPPFLAGS) -Iinclude $(D:%=-DSEXP_USE_%) -DSEXP_USE_BOEHM=1 +else +GCLDFLAGS := +XCPPFLAGS := $(CPPFLAGS) -Iinclude $(D:%=-DSEXP_USE_%) +endif + +ifeq ($(SEXP_USE_DL),0) +XLDFLAGS := $(LDFLAGS) $(RLDFLAGS) $(GCLDFLAGS) -lm +XCFLAGS := -Wall -DSEXP_USE_DL=0 -g -g3 -Os $(CFLAGS) +else +XLDFLAGS := $(LDFLAGS) $(RLDFLAGS) $(GCLDFLAGS) $(LIBDL) -lm +XCFLAGS := -Wall -g -g3 -Os $(CFLAGS) +endif + ######################################################################## all-libs: $(COMPILED_LIBS)