# Change the value of the INSTALLDIR variable to change the install location. INSTALLDIR="$(HOME)/research/cop" DEBUG_FLAGS=-O2 #DEBUG_FLAGS=-g #DEBUG_FLAGS=-g -pg #USE_EFENCE=1 #USE_CCMALLOC=1 ifdef USE_EFENCE EFENCE_FLAGS=-umalloc -ufree -ucalloc -urealloc -uvalloc -umemalign -lefence EF_PROTECT_BELOW=1 endif ifdef USE_CCMALLOC CCMALLOC_FLAGS=-lccmalloc -ldl endif LIBS=$(CCMALLOC_FLAGS) $(EFENCE_FLAGS) -lm CC_FLAGS=-Wall $(DEBUG_FLAGS) CC=gcc $(CC_FLAGS) all: hb cnf2cop cats2cop cnf2cats cnf2lp asgca esgca lin-esgca lin-asgca avgmulticols copio.o: copio.c cop.h $(CC) -c copio.c cop.o: cop.c cop.h $(CC) -c cop.c hb.o: hb.c cop.h $(CC) -c hb.c hb: hb.o cop.h cop.o copio.o $(CC) -o hb hb.o cop.o copio.o $(LIBS) cnf2lp: cnf2lp.c $(CC) -o cnf2lp cnf2lp.c $(LIBS) cnf2cats: cnf2cats.c $(CC) -o cnf2cats cnf2cats.c $(LIBS) cnf2cop: cnf2cop.c cop.h $(CC) -o cnf2cop cnf2cop.c $(LIBS) cats2cop: cats2cop.c cop.h $(CC) -o cats2cop cats2cop.c $(LIBS) asgca.o: asgca.c $(CC) -c asgca.c asgca: asgca.o cop.o cop.h copio.o $(CC) cop.o asgca.o copio.o -o asgca $(LIBS) esgca.o: esgca.c $(CC) -c esgca.c esgca: esgca.o cop.o cop.h copio.o $(CC) cop.o esgca.o copio.o -o esgca $(LIBS) lin-esgca.o: esgca.c $(CC) -c esgca.c -o lin-esgca.o -DUSE_LINEAR lin-esgca: lin-esgca.o cop.o cop.h copio.o $(CC) cop.o lin-esgca.o copio.o -o lin-esgca $(LIBS) lin-asgca.o: asgca.c $(CC) -c asgca.c -o lin-asgca.o -DUSE_LINEAR lin-asgca: lin-asgca.o cop.o cop.h copio.o $(CC) cop.o lin-asgca.o copio.o -o lin-asgca $(LIBS) avgmulticols: avgmulticols.c $(CC) avgmulticols.c -o avgmulticols $(LIBS) proccp: proccp.c $(CC) proccp.c -o proccp $(LIBS) install: mkdir -p $(INSTALLDIR) mkdir -p $(INSTALLDIR)/bin mkdir -p $(INSTALLDIR)/scripts mkdir -p $(INSTALLDIR)/results mkdir -p $(INSTALLDIR)/problems cp hb cnf2cop cats2cop asgca esgca lin-asgca lin-esgca $(INSTALLDIR)/bin cp rcop rasg resg rhb rlasg rlesg avgmulticols $(INSTALLDIR)/bin cp scripts/example scripts/arbitrary scripts/carace scripts/paths scripts/scheduling scripts/regions scripts/matching $(INSTALLDIR)/scripts chmod u+x $(INSTALLDIR)/bin/* $(INSTALLDIR)/scripts archive: mkdir esgblp cp cop.h esgblp cp asgca.c cats2cop.c cnf2cop.c cop.c esgca.c avgmulticols.c esgblp cp cnf2cats.c cnf2lp.c copio.c hb.c esgblp cp rcop rasg resg rhb rlasg rlesg esgblp mkdir esgblp/scripts cp scripts/example scripts/arbitrary scripts/carace scripts/paths scripts/scheduling scripts/regions scripts/matching esgblp/scripts cp Makefile esgblp cp README esgblp cp example.cop esgblp cp gpl.txt esgblp tar zcvf esgblp.tar.gz esgblp rm -rf esgblp clean: rm -f hb cnf2cop cats2cop asgca esgca proccp cnf2cats cnf2lp lin-asgca rm lin-esgca avgmulticols rm -f *.o