|
| 1 | +# Makefile for surge |
| 2 | +VERSION=1_0 |
| 3 | + |
| 4 | +# Define CC to be the name of the C compiler, and CCOPT to be |
| 5 | +# switches for good optimization in your environment. |
| 6 | +CC=gcc |
| 7 | +CCOPT=-march=native -mtune=native -O3 |
| 8 | + |
| 9 | +# Define NAUTY to be the directory where files like nauty.h are |
| 10 | +# located. Define NAUTYLIB to be the directory where files like |
| 11 | +# nautyW1.a are located. |
| 12 | +NAUTY=${HOME}/nauty |
| 13 | +NAUTYLIB=${NAUTY} |
| 14 | + |
| 15 | +# If you have zlib installed, define ZLIB to be "-DZLIB" and ZLIBLIB |
| 16 | +# to be the linker command for zlib. |
| 17 | +ZLIB=-DZLIB |
| 18 | +ZLIBLIB=-lz |
| 19 | +# If you don't have zlib installed, make both of them null. |
| 20 | +#ZLIB= |
| 21 | +#ZLIBLIB= |
| 22 | + |
| 23 | +SURGE=-g -I ${NAUTY} -DWORDSIZE=32 -DMAXN=WORDSIZE -DOUTPROC=surgeproc ${CCOPT} \ |
| 24 | + -DPREPRUNE=surgepreprune ${ZLIB} -DPRUNE=surgeprune -DGENG_MAIN=geng_main |
| 25 | + |
| 26 | +all : surge surge_0 surge_1 surge_2 surge_3 |
| 27 | + |
| 28 | +surge : surge.c |
| 29 | + ${CC} -o surge ${SURGE} \ |
| 30 | + surge.c geng.c planarity.c ${NAUTYLIB}/nautyW1.a ${ZLIBLIB} |
| 31 | + |
| 32 | +surge_0 : surge.c plugin0.c |
| 33 | + ${CC} -o surge_0 ${SURGE} -DSURGEPLUGIN='"plugin0.c"' \ |
| 34 | + surge.c geng.c planarity.c ${NAUTYLIB}/nautyW1.a ${ZLIBLIB} |
| 35 | + |
| 36 | +surge_1 : surge.c plugin1.c |
| 37 | + ${CC} -o surge_1 ${SURGE} -DSURGEPLUGIN='"plugin1.c"' \ |
| 38 | + surge.c geng.c planarity.c ${NAUTYLIB}/nautyW1.a ${ZLIBLIB} |
| 39 | + |
| 40 | +surge_2 : surge.c plugin2.c |
| 41 | + ${CC} -o surge_2 ${SURGE} -DSURGEPLUGIN='"plugin2.c"' \ |
| 42 | + surge.c geng.c planarity.c ${NAUTYLIB}/nautyW1.a ${ZLIBLIB} |
| 43 | + |
| 44 | +surge_3 : surge.c plugin3.c |
| 45 | + ${CC} -o surge_3 ${SURGE} -DSURGEPLUGIN='"plugin3.c"' \ |
| 46 | + surge.c geng.c planarity.c ${NAUTYLIB}/nautyW1.a ${ZLIBLIB} |
| 47 | + |
| 48 | +clean : |
| 49 | + rm -rf surge surge_0 surge_1 surge_2 surge_3 canonsdf |
| 50 | + |
| 51 | +# This one is unoptimized for easier debugging |
| 52 | +surge_g : |
| 53 | + ${CC} -o surge_g ${SURGE} -g -O0 \ |
| 54 | + surge.c geng.c planarity.c ${NAUTYLIB}/nautyW1.a ${ZLIBLIB} |
| 55 | + |
| 56 | +canonsdf : canonsdf.c |
| 57 | + ${CC} -o canonsdf -I {NAUTY} canonsdf.c ${NAUTYLIB}/nautyL1.a |
| 58 | + |
| 59 | +tarfile : |
| 60 | + rm -rf surge${VERSION} |
| 61 | + mkdir surge${VERSION} |
| 62 | + cp SDFformats.txt surge.c planarity.c geng.c makefile COPYRIGHT \ |
| 63 | + canonsdf.c plugin[0-3].c surge1_0.pdf surge${VERSION}/ |
| 64 | + touch surge${VERSION}/This_is_surge_${VERSION}.txt |
| 65 | + tar cvf surge${VERSION}.tar surge${VERSION}/ |
0 commit comments