[med-svn] [Git][med-team/pll-modules][master] Compile and link the examples to the libs and headers located within the...

Shayan Doust gitlab at salsa.debian.org
Sun Jun 7 01:38:38 BST 2020



Shayan Doust pushed to branch master at Debian Med / pll-modules


Commits:
67c1687e by Shayan Doust at 2020-06-07T01:37:26+01:00
Compile and link the examples to the libs and headers located within the package that has just been generated
This has been done very dirtily and can be improved to be neater so experimental

- - - - -


1 changed file:

- debian/patches/modify_examples_makefiles.patch


Changes:

=====================================
debian/patches/modify_examples_makefiles.patch
=====================================
@@ -1,40 +1,85 @@
+Description: link and build against libs and headers built
+ build and link against the libraries and headers built within the package in debian/tmp directory.
+Author: Shayan Doust <hello at shayandoust.me>
+Last-Update: 2020-06-07
+---
 --- pll-modules.orig/examples/consensus/Makefile
 +++ pll-modules/examples/consensus/Makefile
-@@ -30,6 +30,7 @@
+@@ -29,15 +29,17 @@
+ endif
  WARN=-Wall -Wsign-compare $(ADD_WARN)
  
- CFLAGS = -g -O3 -Wall -Wsign-compare $(PROFILING) $(WARN)
-+CFLAGS += -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include/libpll -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
+-CFLAGS = -g -O3 -Wall -Wsign-compare $(PROFILING) $(WARN)
++CFLAGS = -g -O3 -Wall -Wsign-compare $(PROFILING) $(WARN) 
  LDFLAGS = -lpll_tree -lpll -lm
  
  PROG = consensus
+ 
+ default: all
+ all :
+-	cc -g -O3 -Wall -Wsign-compare -g -Wall -Wsign-compare  -c -o $(PROG).o $(PROG).c
+-	cc  -g -O3 -Wall -Wsign-compare -g -Wall -Wsign-compare  $(PROG).o -lpll_tree -lpll -lm -o $(PROG)
++	cc -g -O3 -Wall -Wsign-compare -g -Wall -Wsign-compare  -c -o $(PROG).o $(PROG).c -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
++
++	cc  -g -O3 -Wall -Wsign-compare -g -Wall -Wsign-compare  $(PROG).o -lpll_tree -lpll -lm -o $(PROG) -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
++
+ 
+ 
+ rf-distance : $(OBJS)
 --- pll-modules.orig/examples/rf-distance/Makefile
 +++ pll-modules/examples/rf-distance/Makefile
-@@ -30,6 +30,7 @@
- WARN=-Wall -Wsign-compare $(ADD_WARN)
+@@ -39,10 +39,12 @@
+ all : $(PROG)
  
- CFLAGS = -g -O3 -Wall -Wsign-compare $(PROFILING) $(WARN)
-+CFLAGS += -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include/libpll -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
- LDFLAGS = -lpll_tree -lpll -lm
+ rf-distance : $(OBJS)
+-	$(CC) $(CPPFLAGS) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(PROG)
++	$(CC) $(CPPFLAGS) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(PROG) -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
++
+ 
+ %.o: %.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS) -c -o $@ $< -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
++
  
- OBJS = rf-distance.o
+ clean:
+ 	rm -f *~ $(OBJS) $(PROG)
 --- pll-modules.orig/examples/spr-round/Makefile
 +++ pll-modules/examples/spr-round/Makefile
-@@ -32,6 +32,7 @@
- WARN=-Wall -Wsign-compare $(ADD_WARN)
+@@ -44,10 +44,11 @@
+ all : $(PROG)
  
- CFLAGS = -g -O3 -Wall -Wsign-compare $(PROFILING) $(WARN)
-+CFLAGS += -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include/libpll -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
- LDFLAGS = -lpll_algorithm -lpll_optimize -lpll_tree -lpll_util -lpll -lm
+ spr-round : $(OBJS)
+-	$(CC) $(CPPFLAGS) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(PROG)
++	$(CC) $(CPPFLAGS) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(PROG) -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include/libpll -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
  
- # temp workaround
+ %.o: %.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS) -c -o $@ $< -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include/libpll -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
++
+ 
+ clean:
+ 	rm -f *~ $(OBJS) $(PROG)
 --- pll-modules.orig/examples/weight-consensus/Makefile
 +++ pll-modules/examples/weight-consensus/Makefile
-@@ -30,6 +30,7 @@
- WARN=-Wall -Wsign-compare $(ADD_WARN)
+@@ -36,15 +36,17 @@
  
- CFLAGS = -g -O3 -Wall -Wsign-compare $(PROFILING) $(WARN)
-+CFLAGS += -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include/libpll -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
- LDFLAGS = -lpll_tree -lpll -lm
+ default: all
+ all :
+-	cc -g -O3 -Wall -Wsign-compare -g -Wall -Wsign-compare  -c -o $(PROG).o $(PROG).c
+-	cc  -g -O3 -Wall -Wsign-compare -g -Wall -Wsign-compare  $(PROG).o -lpll_tree -lpll -lm -o $(PROG)
++	cc -g -O3 -Wall -Wsign-compare -g -Wall -Wsign-compare  -c -o $(PROG).o $(PROG).c -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
+ 
++	cc  -g -O3 -Wall -Wsign-compare -g -Wall -Wsign-compare  $(PROG).o -lpll_tree -lpll -lm -o $(PROG) -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
+ 
+ rf-distance : $(OBJS)
+-	$(CC) $(CPPFLAGS) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(PROG)
++	$(CC) $(CPPFLAGS) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(PROG) -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
++
+ 
+ %.o: %.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS) -c -o $@ $< -I/usr/include/libpll -I$(CURDIR)/../../debian/tmp/usr/include -L/usr/lib -L$(CURDIR)/../../debian/tmp/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/
++
  
- PROG = weight-consensus
+ clean:
+ 	rm -f *~ $(OBJS) $(PROG)



View it on GitLab: https://salsa.debian.org/med-team/pll-modules/-/commit/67c1687e5cdd85f921e63dc2f61fef42cd6fb930

-- 
View it on GitLab: https://salsa.debian.org/med-team/pll-modules/-/commit/67c1687e5cdd85f921e63dc2f61fef42cd6fb930
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/20200607/84e9e2d0/attachment-0001.html>


More information about the debian-med-commit mailing list