summaryrefslogtreecommitdiff
path: root/lib/make
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-09-04 19:26:53 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-09-04 19:26:53 +0000
commit6daa88242886915eea04461f3ee212dce0bb3ecd (patch)
tree7989ebca92daef6669e9359be05ceaf348120052 /lib/make
parent031d44ca1ebb3f0ba56759874d1ba8672dbef53f (diff)
Added yet another make variable.
Now the make stuff required for the final linking of libraries is bundled up into GENERAL_LIBRARIES which defaults to $(LIBDIRS:%=-L%) $(LIBS:%=-l%) which should work on all unices. For NT I have made it $(LIBS) and LIBDIRS has no use. NT stuff needs to specify the full path and name of each library in the LIBS variable. Maybe one day we'll find a neater way ! Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@874 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make')
-rwxr-xr-xlib/make/configure13
-rw-r--r--lib/make/configure.in12
-rw-r--r--lib/make/known-architectures/cygwin5
-rw-r--r--lib/make/make.config.defn.in3
-rw-r--r--lib/make/make.configuration9
5 files changed, 33 insertions, 9 deletions
diff --git a/lib/make/configure b/lib/make/configure
index 552af82b..db97e6aa 100755
--- a/lib/make/configure
+++ b/lib/make/configure
@@ -2334,14 +2334,15 @@ EOF
PERL_CONFIGURE_SCRIPT=`echo $srcdir/configure.pl | sed 's,^//\(.\)/,\1:/,'`
-BUILD_ACTIVETHORNS=`echo $srcdir/../sbin/BuildActiveThorns.pl | sed 's,^//\(.\)/,\1:/,'`
+BUILD_ACTIVETHORNS='$(CCTK_HOME)/lib/sbin/BuildActiveThorns.pl'
-CST=`echo $srcdir/../sbin/CST | sed 's,^//\(.\)/,\1:/,'`
+CST='$(CCTK_HOME)/lib//sbin/CST'
-F_FILE_PROCESSOR='${CCTK_HOME}/lib/sbin/f_file_processor.pl'
-C_FILE_PROCESSOR='${CCTK_HOME}/lib/sbin/c_file_processor.pl'
+F_FILE_PROCESSOR='$(CCTK_HOME)/lib/sbin/f_file_processor.pl'
+
+C_FILE_PROCESSOR='$(CCTK_HOME)/lib/sbin/c_file_processor.pl'
@@ -2414,6 +2415,9 @@ LDFLAGS="$KNOWN_LDFLAGS $LDFLAGS"
: ${SYS_INC_DIRS=" "}
+: ${GENERAL_LIBRARIES='$(LIBDIRS:%=-L%) $(LIBS:%=-l%)'}
+
+
trap '' 1 2 15
@@ -2603,6 +2607,7 @@ s%@F_DEPEND@%$F_DEPEND%g
s%@F_DEPEND_OUT@%$F_DEPEND_OUT%g
s%@GET_WD@%$GET_WD%g
s%@SYS_INC_DIRS@%$SYS_INC_DIRS%g
+s%@GENERAL_LIBRARIES@%$GENERAL_LIBRARIES%g
CEOF
EOF
diff --git a/lib/make/configure.in b/lib/make/configure.in
index ad24b4d5..acc576b5 100644
--- a/lib/make/configure.in
+++ b/lib/make/configure.in
@@ -333,14 +333,15 @@ AC_DEFINE_UNQUOTED(FMODIFIER, $FMODIFIER)
PERL_CONFIGURE_SCRIPT=`echo $srcdir/configure.pl | sed 's,^//\(.\)/,\1:/,'`
AC_SUBST(BUILD_ACTIVETHORNS)
-BUILD_ACTIVETHORNS=`echo $srcdir/../sbin/BuildActiveThorns.pl | sed 's,^//\(.\)/,\1:/,'`
+BUILD_ACTIVETHORNS='$(CCTK_HOME)/lib/sbin/BuildActiveThorns.pl'
+
AC_SUBST(CST)
-CST=`echo $srcdir/../sbin/CST | sed 's,^//\(.\)/,\1:/,'`
+CST='$(CCTK_HOME)/lib//sbin/CST'
AC_SUBST(F_FILE_PROCESSOR)
-F_FILE_PROCESSOR='${CCTK_HOME}/lib/sbin/f_file_processor.pl'
+F_FILE_PROCESSOR='$(CCTK_HOME)/lib/sbin/f_file_processor.pl'
AC_SUBST(C_FILE_PROCESSOR)
-C_FILE_PROCESSOR='${CCTK_HOME}/lib/sbin/c_file_processor.pl'
+C_FILE_PROCESSOR='$(CCTK_HOME)/lib/sbin/c_file_processor.pl'
@@ -412,6 +413,9 @@ AC_SUBST(GET_WD)
AC_SUBST(SYS_INC_DIRS)
: ${SYS_INC_DIRS=" "}
+AC_SUBST(GENERAL_LIBRARIES)
+: ${GENERAL_LIBRARIES='$(LIBDIRS:%=-L%) $(LIBS:%=-l%)'}
+
dnl Run any other scripts necessary
AC_OUTPUT_COMMANDS(,$PERL -s $PERL_CONFIGURE_SCRIPT -compiler="$F77" -opts="$F77FLAGS" .)
diff --git a/lib/make/known-architectures/cygwin b/lib/make/known-architectures/cygwin
index 5fc9171a..c5f0924f 100644
--- a/lib/make/known-architectures/cygwin
+++ b/lib/make/known-architectures/cygwin
@@ -46,6 +46,11 @@ MKDIR="mkdir -p"
CACTUSLIBLINKLINE='$(addsuffix .a,$(addprefix $(subst /,$(DIRSEP),$(CCTK_LIBDIR))$(DIRSEP)lib,$(notdir $(ALLCACTUSLIBS))))'
+# Windows libraries have to explicitly appear on the link line with full name
+# So ignore the LIBDIRS variable and don't put flags on.
+
+GENERAL_LIBRARIES='$(LIBS)'
+
cat >> cctk_archdefs.h <<EOF;
/* WIN stuff */
diff --git a/lib/make/make.config.defn.in b/lib/make/make.config.defn.in
index 3c7b6272..8401775a 100644
--- a/lib/make/make.config.defn.in
+++ b/lib/make/make.config.defn.in
@@ -76,6 +76,9 @@ GET_WD = @GET_WD@
LIBS += @LIBS@
LIBDIRS += @LIBDIRS@
+# Command to generate the link line for libraries
+GENERAL_LIBRARIES = @GENERAL_LIBRARIES@
+
# System include directories
SYS_INC_DIRS += @SYS_INC_DIRS@
diff --git a/lib/make/make.configuration b/lib/make/make.configuration
index 88458f5b..219ca08e 100644
--- a/lib/make/make.configuration
+++ b/lib/make/make.configuration
@@ -38,6 +38,13 @@ DIVIDER = $(DIVEL)$(DIVEL)$(DIVEL)$(DIVEL)
# Include the definitions for this configuration
include $(CONFIG)/make.config.defn
+# Put this in temporarily to make sure that people with existing
+# configurations aren't disturbed
+
+ifeq ($(strip $(GENERAL_LIBRARIES)),)
+GENERAL_LIBRARIES = $(LIBDIRS:%=-L%) $(LIBS:%=-l%)
+endif
+
# Include the list of thorns to be built
# (Use -include to prevent warnings messages, as the file will be built if
# it is missing .)
@@ -60,7 +67,7 @@ $(EXEDIR)$(DIRSEP)$(EXE): $(CONFIG)/make.thornlist $(CONFIG)/cctk_version.h $(pa
@echo Creating $(EXE) in $(EXEDIR) from $(THORNS)
$(CC) $(DEBUG_C) $(CFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)$(TOP)$(DIRSEP)datestamp.o -I$(CONFIG) $(subst /,$(DIRSEP),$(DATESTAMP))
if [ ! -d $(EXEDIR) ]; then $(MKDIR) $(EXEDIR) ; fi
- $(LD) $(CREATEEXE)$(OPTIONSEP)$(subst /,$(DIRSEP),$@) $(DEBUG_LD) $(LDFLAGS) $(EXTRAFLAGS) $(subst /,$(DIRSEP), $(TOP)/datestamp.o) $(CACTUSLIBLINKLINE) $(LIBDIRS:%=-L%) $(LIBS:%=-l%)
+ $(LD) $(CREATEEXE)$(OPTIONSEP)$(subst /,$(DIRSEP),$@) $(DEBUG_LD) $(LDFLAGS) $(EXTRAFLAGS) $(subst /,$(DIRSEP), $(TOP)/datestamp.o) $(CACTUSLIBLINKLINE) $(GENERAL_LIBRARIES)
@echo $(DIVIDER)
@echo All done !
@echo $(DIVIDER)