[med-svn] [Git][med-team/ampl-netlib-solvers][master] add patch to get libamplsolver.so
Andrei Rozanski
gitlab at salsa.debian.org
Tue Sep 29 14:28:34 BST 2020
Andrei Rozanski pushed to branch master at Debian Med / ampl-netlib-solvers
Commits:
3086b5ef by Andrei Rozanski at 2020-09-29T15:24:20+02:00
add patch to get libamplsolver.so
- - - - -
4 changed files:
- − debian/patches/fix-makefile-cflags
- + debian/patches/fix-makefile-shared-lib.patch
- debian/patches/series
- makefile.u
Changes:
=====================================
debian/patches/fix-makefile-cflags deleted
=====================================
@@ -1,12 +0,0 @@
-fixed CFLAGS.
---- a/makefile.u
-+++ b/makefile.u
-@@ -26,7 +26,7 @@
-
- .SUFFIXES: .c .o
- CC = cc
--CFLAGS = -O
-+CFLAGS := $(CFLAGS) -pipe -DASL_BUILD -fPIC -DPIC
- SHELL=/bin/sh
-
- # Add -DNO_RUSAGE to the CFLAGS assignment if your system
=====================================
debian/patches/fix-makefile-shared-lib.patch
=====================================
@@ -0,0 +1,34 @@
+fix makefile.u in order to get libamplsover.so
+--- a/makefile.u
++++ b/makefile.u
+@@ -26,8 +26,9 @@
+
+ .SUFFIXES: .c .o
+ CC = cc
+-CFLAGS = -O
++CFLAGS := $(CFLAGS) -pipe -DASL_BUILD -fPIC -DPIC
+ SHELL=/bin/sh
++OFILES=$(addsuffix .o,$(basename $(a)))
+
+ # Add -DNO_RUSAGE to the CFLAGS assignment if your system
+ # lacks getrusage(). This only matters for compiling xectim.c.
+@@ -86,7 +87,7 @@
+ .c.o:
+ $(CC) -c $(CFLAGS) $*.c
+
+-all: arith.h stdio1.h amplsolver.a funcadd0.o
++all: arith.h stdio1.h amplsolver.a funcadd0.o libamplsolver.so
+
+ a = \
+ asldate.c \
+@@ -181,6 +182,10 @@
+ xp2known.c
+
+ ARFLAGS = ruv
++
++libamplsolver.so: $(OFILES)
++ $(CC) $^ -shared -o $@
++
+ amplsolver.a: $a
+ $(CC) -c $(CFLAGS) $?
+ x=`echo $? | sed 's/\.[cs]/.o/g'` && ar $(ARFLAGS) amplsolver.a $$x && rm $$x
=====================================
debian/patches/series
=====================================
@@ -1 +1 @@
-fix-makefile-cflags
+fix-makefile-shared-lib.patch
=====================================
makefile.u
=====================================
@@ -26,8 +26,9 @@
.SUFFIXES: .c .o
CC = cc
-CFLAGS = -O
+CFLAGS := $(CFLAGS) -pipe -DASL_BUILD -fPIC -DPIC
SHELL=/bin/sh
+OFILES=$(addsuffix .o,$(basename $(a)))
# Add -DNO_RUSAGE to the CFLAGS assignment if your system
# lacks getrusage(). This only matters for compiling xectim.c.
@@ -86,7 +87,7 @@ SHELL=/bin/sh
.c.o:
$(CC) -c $(CFLAGS) $*.c
-all: arith.h stdio1.h amplsolver.a funcadd0.o
+all: arith.h stdio1.h amplsolver.a funcadd0.o libamplsolver.so
a = \
asldate.c \
@@ -181,6 +182,10 @@ a = \
xp2known.c
ARFLAGS = ruv
+
+libamplsolver.so: $(OFILES)
+ $(CC) $^ -shared -o $@
+
amplsolver.a: $a
$(CC) -c $(CFLAGS) $?
x=`echo $? | sed 's/\.[cs]/.o/g'` && ar $(ARFLAGS) amplsolver.a $$x && rm $$x
View it on GitLab: https://salsa.debian.org/med-team/ampl-netlib-solvers/-/commit/3086b5efa31e394bd3cd3148bedfbfd20a2f0aa1
--
View it on GitLab: https://salsa.debian.org/med-team/ampl-netlib-solvers/-/commit/3086b5efa31e394bd3cd3148bedfbfd20a2f0aa1
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200929/e2fdb174/attachment-0001.html>
More information about the debian-med-commit
mailing list