mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
207 lines
5.0 KiB
Diff
207 lines
5.0 KiB
Diff
Teach the configurator how to build a macOS dynamic library and link
|
|
everything with it instead of the static library.
|
|
--- config/darwin.mk.orig 2018-11-27 14:30:54.000000000 -0600
|
|
+++ config/darwin.mk 2018-11-27 14:54:58.000000000 -0600
|
|
@@ -1,7 +1,9 @@
|
|
#########################################################
|
|
-# Linux #
|
|
+# macOS #
|
|
#########################################################
|
|
OBJEXT=.o
|
|
+SHAREDLIBEXT=.dylib
|
|
+SHAREDLIBFLAGS=-dynamiclib -install_name $(PREFIX)/lib/$(notdir $@)
|
|
LIBEXT=.a
|
|
EXEEXT=
|
|
F2CEXT=.c
|
|
--- configurator/taucs_config.c.orig 2018-11-27 15:03:39.000000000 -0600
|
|
+++ configurator/taucs_config.c 2018-11-27 15:19:44.000000000 -0600
|
|
@@ -132,6 +132,7 @@
|
|
if (flags & hsource ) return ".h";
|
|
if (flags & csource ) return ".c";
|
|
if (flags & cilksource) return ".c";
|
|
+ if (flags & sharedlib ) return "$(SHAREDLIBEXT)";
|
|
if (flags & lib ) return "$(LIBEXT)";
|
|
if (flags & executable) return "$(EXEEXT)";
|
|
|
|
@@ -558,8 +559,12 @@
|
|
|
|
fprintf(f, "%s: $(%s_content) $(STDDEPS)\n",get_full_name(i,0),base);
|
|
fprintf(f,"\t- $(RM) %s\n",get_full_name(i,0));
|
|
+ if ( (files[i].flags & sharedlib) ) {
|
|
+ fprintf(f,"\t$(FC) $(FCFLAGS) $(COUTFLG)%s $(%s_content) $(SHAREDLIBFLAGS) $(LDFLAGS) $(LIBS)\n",get_full_name(i,0),base);
|
|
+ } else {
|
|
fprintf(f,"\t$(AR) $(AOUTFLG)%s $(%s_content)\n",get_full_name(i,0),base);
|
|
fprintf(f,"\t$(RANLIB) %s\n",get_full_name(i,0));
|
|
+ }
|
|
}
|
|
|
|
if ( (files[i].flags & executable) ) {
|
|
--- configurator/taucs_structure.h.orig 2003-09-04 04:05:18.000000000 -0500
|
|
+++ configurator/taucs_structure.h 2018-11-27 16:05:44.000000000 -0600
|
|
@@ -67,7 +67,9 @@
|
|
dcomplex = 2048,
|
|
scomplex = 4096,
|
|
dreal = 8192,
|
|
- sreal = 16384
|
|
+ sreal = 16384,
|
|
+
|
|
+ sharedlib = 32768
|
|
};
|
|
|
|
int source_types = csource | fcsource | cilksource;
|
|
@@ -151,7 +158,7 @@
|
|
"taucs_ccs_ops",
|
|
0
|
|
},
|
|
- "libtaucs",
|
|
+ "libtaucs.1",
|
|
{ "LIBLAPACK", "LIBBLAS", 0 }
|
|
},
|
|
|
|
@@ -161,7 +168,7 @@
|
|
"readhb",
|
|
0
|
|
},
|
|
- "libtaucs",
|
|
+ "libtaucs.1",
|
|
{ 0 }
|
|
},
|
|
|
|
@@ -172,17 +179,17 @@
|
|
|
|
{ "AMD" , include, 0, { "ORDERING", 0 },
|
|
{ "amdatr","amdbar","amdexa","amdhaf","amdhat","amdpre","amdtru", 0 },
|
|
- "libtaucs", { 0 }
|
|
+ "libtaucs.1", { 0 }
|
|
},
|
|
|
|
{ "COLAMD" , include, 0, { "ORDERING", 0 },
|
|
{ "colamd", 0 },
|
|
- "libtaucs", { 0 }
|
|
+ "libtaucs.1", { 0 }
|
|
},
|
|
|
|
{ "GENMMD" , include, 0, { "ORDERING", 0 },
|
|
{ "genmmd", 0 },
|
|
- "libtaucs", { 0 }
|
|
+ "libtaucs.1", { 0 }
|
|
},
|
|
|
|
{ "ORDERING", include, 0 , { "BASE", 0 },
|
|
@@ -190,7 +197,7 @@
|
|
"taucs_ccs_order",
|
|
0
|
|
},
|
|
- "libtaucs",
|
|
+ "libtaucs.1",
|
|
{ 0 }
|
|
},
|
|
|
|
@@ -199,7 +206,7 @@
|
|
"taucs_linsolve",
|
|
0
|
|
},
|
|
- "libtaucs",
|
|
+ "libtaucs.1",
|
|
{ 0 }
|
|
},
|
|
|
|
@@ -208,18 +215,18 @@
|
|
"taucs_sn_llt",
|
|
0
|
|
},
|
|
- "libtaucs",
|
|
+ "libtaucs.1",
|
|
{ 0 }
|
|
},
|
|
|
|
{ "OOC_LLT" , include, 0, { "BASE", "ADVANCED_MEMORY_OPS", 0 },
|
|
{ "taucs_ccs_ooc_llt", "taucs_ooc_io", 0 },
|
|
- "libtaucs", { 0 }
|
|
+ "libtaucs.1", { 0 }
|
|
},
|
|
|
|
{ "OOC_LU" , include, 0, { "BASE", "ADVANCED_MEMORY_OPS", 0 },
|
|
{ "taucs_ccs_ooc_lu", "taucs_ooc_io", 0 },
|
|
- "libtaucs", { 0 }
|
|
+ "libtaucs.1", { 0 }
|
|
},
|
|
|
|
{ "ADVANCED_MEMORY_OPS", include, 0 , { "BASE", 0 },
|
|
@@ -227,23 +234,23 @@
|
|
"taucs_memory",
|
|
0
|
|
},
|
|
- "libtaucs",
|
|
+ "libtaucs.1",
|
|
{ 0 }
|
|
},
|
|
|
|
{ "VAIDYA", include, 0, { "BASE", 0 },
|
|
{ "taucs_vaidya", "taucs_iter", 0 },
|
|
- "libtaucs", { 0 }
|
|
+ "libtaucs.1", { 0 }
|
|
},
|
|
|
|
{ "REC_VAIDYA", include, 0, { "BASE", 0 },
|
|
{ "taucs_recvaidya", "taucs_iter" ,0 },
|
|
- "libtaucs", { 0 }
|
|
+ "libtaucs.1", { 0 }
|
|
},
|
|
|
|
{ "GREMBAN" , include, 0, { "BASE", 0 },
|
|
{ "taucs_gremban", "taucs_iter" ,0 },
|
|
- "libtaucs", { 0 }
|
|
+ "libtaucs.1", { 0 }
|
|
},
|
|
|
|
{ "INCOMPLETE_CHOL", include, 0 , { "BASE", 0 },
|
|
@@ -252,18 +259,18 @@
|
|
"taucs_ccs_solve_llt",
|
|
0
|
|
},
|
|
- "libtaucs",
|
|
+ "libtaucs.1",
|
|
{ 0 }
|
|
},
|
|
|
|
{ "ITER" , include, 0, { "BASE", 0 },
|
|
{ "taucs_iter", 0 },
|
|
- "libtaucs", { 0 }
|
|
+ "libtaucs.1", { 0 }
|
|
},
|
|
|
|
{ "INVERSE_FACTOR" , include, 0, { "BASE", 0 },
|
|
{ "taucs_ccs_xxt", 0 },
|
|
- "libtaucs", { 0 }
|
|
+ "libtaucs.1", { 0 }
|
|
},
|
|
|
|
{ "TESTING_PROGRAMS" , include, 0, { "TEST_DIRECT", "TEST_ITER", "TEST_MEMORY", 0 },
|
|
@@ -290,7 +297,7 @@
|
|
"taucs_ccs_generators",
|
|
0
|
|
},
|
|
- "libtaucs", { 0 }
|
|
+ "libtaucs.1", { 0 }
|
|
},
|
|
|
|
{ "MALLOC_STUBS" , include, 0, { "BASE", 0 },
|
|
@@ -298,7 +305,7 @@
|
|
"taucs_malloc",
|
|
0
|
|
},
|
|
- "libtaucs", { 0 }
|
|
+ "libtaucs.1", { 0 }
|
|
},
|
|
|
|
{ "AD_HOC_TEST" , exclude, 0, { "BASE", 0 }, /* this is for ad-hoc testing */
|
|
@@ -366,6 +373,7 @@
|
|
{ "memory_test" , "DIRPROGS", csource },
|
|
|
|
{ "libtaucs" , "DIRLIB", lib },
|
|
+ { "libtaucs.1" , "DIRLIB", sharedlib | lib },
|
|
|
|
{ "direct" , "DIREXE", executable },
|
|
{ "taucs_run" , "DIREXE", executable },
|