[SCM] Debian packaging for nauty branch, feature/shlib, updated. upstream/2.4.b7-8-g938aacf
David Bremner
bremner at unb.ca
Tue Feb 23 11:58:14 UTC 2010
The following commit has been merged in the feature/shlib branch:
commit 13c5530e1b760740ba10ee6768e8e8d35ee67936
Author: David Bremner <bremner at unb.ca>
Date: Sat Feb 13 13:00:38 2010 -0400
Add install targets; replace libs with $(LIBS) as dependency.
diff --git a/makefile.in b/makefile.in
index 3aedd87..ac87707 100644
--- a/makefile.in
+++ b/makefile.in
@@ -29,15 +29,22 @@ SHNAUTYLIBOBJ= naututil.os nauty.os nautil.os nautinv.os naugraph.os rng.os
SHGTLIBOBJ=gtools.os gtnauty.os nausparse.os gutil1.os gutil2.os naugroup.os
SHLIBOBJ=${SHNAUTYLIBOBJ} ${SHGTLIBOBJ}
+STLIB=libnauty.a
-SONAME=libnauty.so.0
-SOMINOR=.0.0
-SHLIB=$(SONAME)$(SOMINOR)
-BUILDSHLIBS=libnauty.so $(SONAME) $(SHLIB)
+SONAME?=libnauty.so.0
+SOMINOR?=.0.0
+SHLIB?=$(SONAME)$(SOMINOR)
+SHLINK?=libnauty.so
+BUILDSHLIBS=$(SONAME) $(SHLIB)
BUILDSHLIBS=
-
LDFLAGS:=-L. -lnauty $(LDFLAGS)
+DESTDIR=
+GTOOLSBIN=copyg listg labelg dretog amtog geng complg shortg showg NRswitchg \
+ biplabg addedgeg deledgeg countg pickg genrang newedgeg catg genbg directg \
+ multig planarg gentourng
+BINARIES=$(GTOOLSBIN) dreadnaut
+
.SUFFIXES: .os
.c.os:
${CC} -c ${PICFLAGS} ${CFLAGS} -o $@ $<
@@ -45,15 +52,16 @@ LDFLAGS:=-L. -lnauty $(LDFLAGS)
%.o: %.c
${CC} -c ${CFLAGS} -o $@ $<
+.PHONY: all nauty libs gtools install clean
+
all : nauty gtools ;
nauty : dreadnaut ;
-libs: libnauty.a $(BUILDSHLIBS)
+LIBS=$(STLIB) $(BUILDSHLIBS)
+libs: $(LIBS)
-gtools : copyg listg labelg dretog amtog geng complg shortg showg NRswitchg \
- biplabg addedgeg deledgeg countg pickg genrang newedgeg catg genbg directg \
- multig planarg gentourng ;
+gtools: $(GTOOLSBIN)
$(SHLIB): $(SHLIBOBJ)
gcc -shared -Wl,-soname=$(SONAME) -o $(SONAME)$(SOMINOR) $(SHLIBOBJ)
@@ -61,16 +69,28 @@ $(SHLIB): $(SHLIBOBJ)
$(SONAME): $(SHLIB)
rm -f $@ && ln -s $(SHLIB) $@
-libnauty.so: $(SONAME)
- rm -f $@ && ln -s $(SONAME) $@
+install-shlibs: $(SHLIB)
+ mkdir -p $(DESTDIR)/usr/lib
+ install -t $(DESTDIR)/usr/lib $(SHLIB)
+ cd $(DESTDIR)/usr/lib && ln -sf $(SONAME) $(SHLINK) && ln -sf $(SHLIB) $(SONAME)
+
+install:
+ mkdir -p $(DESTDIR)/usr/bin
+ install -t $(DESTDIR)/usr/bin $(BINARIES)
+
+install-dev:
+ mkdir -p $(DESTDIR)/usr/include
+ install -t $(DESTDIR)/usr/include nauty.h
+ mkdir -p $(DESTDIR)/usr/lib
+ install -t $(DESTDIR)/usr/lib $(STLIB)
-libnauty.a: $(LIBOBJ)
+$(STLIB): $(LIBOBJ)
ar r $@ $(LIBOBJ)
rng.o: rng.c
${CC} -c ${CFLAGS} rng.c
-dreadnaut: dreadnaut.c libs
+dreadnaut: dreadnaut.c $(LIBS)
${CC} -o dreadnaut ${SAFECFLAGS} dreadnaut.c ${LDFLAGS}
naututil.o: nauty.h naututil.h naututil.c
@@ -226,25 +246,25 @@ gutil1.o : gtools.h gutils.h gutil1.c
gutil2.o : gtools.h gutils.h gutil2.c
${CC} -c ${CFLAGS} gutil2.c
-catg : gtools.h catg.c libs
+catg : gtools.h catg.c $(LIBS)
${CC} -o catg ${CFLAGS} catg.c ${LDFLAGS}
-copyg : gtools.h copyg.c libs
+copyg : gtools.h copyg.c $(LIBS)
${CC} -o copyg ${CFLAGS} copyg.c ${LDFLAGS}
-listg : gtools.h listg.c libs
+listg : gtools.h listg.c $(LIBS)
${CC} -o listg ${CFLAGS} listg.c ${LDFLAGS}
-labelg : gtools.h naututil.h labelg.c libs
+labelg : gtools.h naututil.h labelg.c $(LIBS)
${CC} -o labelg ${SAFECFLAGS} labelg.c ${LDFLAGS}
-shortg : gtools.h shortg.c libs
+shortg : gtools.h shortg.c $(LIBS)
${CC} -o shortg ${CFLAGS} shortg.c ${LDFLAGS}
-dretog : gtools.h dretog.c libs
+dretog : gtools.h dretog.c $(LIBS)
${CC} -o dretog ${CFLAGS} dretog.c ${LDFLAGS}
-amtog : gtools.h amtog.c libs
+amtog : gtools.h amtog.c $(LIBS)
${CC} -o amtog ${CFLAGS} amtog.c ${LDFLAGS}
genbg : gtools.h genbg.c gtoolsW1.o nautyW1.o nautilW1.o naugraphW1.o
@@ -271,40 +291,40 @@ gentourng : gtools.h gentourng.c gtools.o nauty1.o nautil1.o naugraph1.o
${CC} -o gentourng ${CFLAGS} -DMAXN=24 gentourng.c gtools.o nauty1.o \
nautil1.o naugraph1.o ${LDFLAGS}
-genrang : gtools.h genrang.c libs
+genrang : gtools.h genrang.c $(LIBS)
${CC} -o genrang ${CFLAGS} genrang.c ${LDFLAGS}
complg : gtools.h complg.c
${CC} -o complg ${CFLAGS} complg.c ${LDFLAGS}
-biplabg : gtools.h biplabg.c libs
+biplabg : gtools.h biplabg.c $(LIBS)
${CC} -o biplabg ${CFLAGS} biplabg.c ${LDFLAGS}
-NRswitchg : gtools.h NRswitchg.c libs
+NRswitchg : gtools.h NRswitchg.c $(LIBS)
${CC} -o NRswitchg ${CFLAGS} NRswitchg.c ${LDFLAGS}
-deledgeg : gtools.h deledgeg.c libs
+deledgeg : gtools.h deledgeg.c $(LIBS)
${CC} -o deledgeg ${CFLAGS} deledgeg.c ${LDFLAGS}
-addedgeg : gtools.h addedgeg.c libs
+addedgeg : gtools.h addedgeg.c $(LIBS)
${CC} -o addedgeg ${CFLAGS} addedgeg.c ${LDFLAGS}
-newedgeg : gtools.h newedgeg.c libs
+newedgeg : gtools.h newedgeg.c $(LIBS)
${CC} -o newedgeg ${CFLAGS} newedgeg.c ${LDFLAGS}
-pickg : gtools.h testg.c splay.c libs
+pickg : gtools.h testg.c splay.c $(LIBS)
${CC} -o pickg ${SAFECFLAGS} testg.c ${LDFLAGS}
-countg : gtools.h testg.c splay.c libs
+countg : gtools.h testg.c splay.c $(LIBS)
${CC} -o countg ${SAFECFLAGS} testg.c ${LDFLAGS}
-directg : gtools.h naugroup.h directg.c libs
+directg : gtools.h naugroup.h directg.c $(LIBS)
${CC} -o directg ${CFLAGS} directg.c ${LDFLAGS}
-multig : gtools.h naugroup.h multig.c libs
+multig : gtools.h naugroup.h multig.c $(LIBS)
${CC} -o multig ${CFLAGS} multig.c ${LDFLAGS}
-planarg : gtools.h planarg.c planarity.c libs
+planarg : gtools.h planarg.c planarity.c $(LIBS)
${CC} -o planarg ${CFLAGS} planarg.c planarity.c ${LDFLAGS}
showg : showg.c
--
Debian packaging for nauty
More information about the debian-science-commits
mailing list