[med-svn] [Git][med-team/gjh-asl-json][master] patch - makefile fix - link libamplsover.a

Andrei Rozanski gitlab at salsa.debian.org
Wed Sep 30 20:35:49 BST 2020



Andrei Rozanski pushed to branch master at Debian Med / gjh-asl-json


Commits:
e226d740 by Andrei Rozanski at 2020-09-30T21:34:42+02:00
patch - makefile fix - link libamplsover.a

- - - - -


3 changed files:

- Makefile
- + debian/patches/fix-makefile-lib.patch
- + debian/patches/series


Changes:

=====================================
Makefile
=====================================
@@ -1,34 +1,30 @@
 SRC=src
-TPL=Thirdparty
-
+INC_DIR = /usr/include/ampl-netlib-solvers/
+LIB = /usr/lib/x86_64-linux-gnu/
 PREFIX=.
+
 BIN=$(PREFIX)/bin
 
 # Override this to inject gcov flags "-coverage -O0"
 # in travis CI script. E.g., $ make COVERAGE="-coverage -O0"
 COVERAGE=-O3
 
-CINC=-I$(SRC) -I$(TPL)/solvers
+CINC=-I$(SRC) -I$(LIB) -I$(INC_DIR)
 CFLAGS= -pipe -DASL_BUILD -fPIC -DPIC -Wall
 LDFLAGS=-ldl
 
-all: 	$(TPL)/solvers/amplsolver.a \
-	$(BIN)/gjh_asl_json
+all: 	$(BIN)/gjh_asl_json
 
 $(BIN)/gjh_asl_json: $(SRC)/gjh_asl_json.o \
 	             $(SRC)/AmplInterface.o \
-		     $(TPL)/solvers/amplsolver.a
+		     $(lib)/libamplsolver.a
 	@mkdir -p $(BIN)
 	$(CXX) $(COVERAGE) $(CFLAGS) $(CINC) $^ $(LDFLAGS) -o $@
 
 %.o : %.cpp $(SRC)/AmplInterface.hpp
 	$(CXX) $(COVERAGE) $(CFLAGS) $(CINC) -c $< -o $@
 
-$(TPL)/solvers/amplsolver.a :
-	make -C $(TPL)/solvers/;
-
 clean:
 	rm -f $(BIN)/gjh_asl_json;
 	rm -f $(SRC)/*.o
 	rm -f $(SRC)/*~
-	make clean -C $(TPL)/solvers;


=====================================
debian/patches/fix-makefile-lib.patch
=====================================
@@ -0,0 +1,43 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,34 +1,30 @@
+ SRC=src
+-TPL=Thirdparty
+-
++INC_DIR = /usr/include/ampl-netlib-solvers/
++LIB = /usr/lib/x86_64-linux-gnu/
+ PREFIX=.
++
+ BIN=$(PREFIX)/bin
+ 
+ # Override this to inject gcov flags "-coverage -O0"
+ # in travis CI script. E.g., $ make COVERAGE="-coverage -O0"
+ COVERAGE=-O3
+ 
+-CINC=-I$(SRC) -I$(TPL)/solvers
++CINC=-I$(SRC) -I$(LIB) -I$(INC_DIR)
+ CFLAGS= -pipe -DASL_BUILD -fPIC -DPIC -Wall
+ LDFLAGS=-ldl
+ 
+-all: 	$(TPL)/solvers/amplsolver.a \
+-	$(BIN)/gjh_asl_json
++all: 	$(BIN)/gjh_asl_json
+ 
+ $(BIN)/gjh_asl_json: $(SRC)/gjh_asl_json.o \
+ 	             $(SRC)/AmplInterface.o \
+-		     $(TPL)/solvers/amplsolver.a
++		     $(lib)/libamplsolver.a
+ 	@mkdir -p $(BIN)
+ 	$(CXX) $(COVERAGE) $(CFLAGS) $(CINC) $^ $(LDFLAGS) -o $@
+ 
+ %.o : %.cpp $(SRC)/AmplInterface.hpp
+ 	$(CXX) $(COVERAGE) $(CFLAGS) $(CINC) -c $< -o $@
+ 
+-$(TPL)/solvers/amplsolver.a :
+-	make -C $(TPL)/solvers/;
+-
+ clean:
+ 	rm -f $(BIN)/gjh_asl_json;
+ 	rm -f $(SRC)/*.o
+ 	rm -f $(SRC)/*~
+-	make clean -C $(TPL)/solvers;


=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+fix-makefile-lib.patch



View it on GitLab: https://salsa.debian.org/med-team/gjh-asl-json/-/commit/e226d740ade0ba73880eaacd46ea4c20f32d26d1

-- 
View it on GitLab: https://salsa.debian.org/med-team/gjh-asl-json/-/commit/e226d740ade0ba73880eaacd46ea4c20f32d26d1
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/20200930/7af12d6c/attachment-0001.html>


More information about the debian-med-commit mailing list