######################################################## # Make file for AI project1 ######################################################### VPATH=.:./MemoryManagers:./DiskManagers:./interface INCLUDE=-I./includes/ -I. -I./WalkSat/ -I./DPLL/ CC=gcc #CC=g++ #C=gcc CFLAGS= -ggdb $(INCLUDE) cflags= -ggdb $(INCLUDE) OBJECTS=bin/globals.o CNFOBJ=bin/generateCNF.o all: bin/SatSolverGA bin/SatSolverDPLL bin/WalkSat bin/SatSolver: $(OBJECTS) bin/main.o bin/WalkSat.o bin/dpll.o $(CC) $(CFLAGS) $^ -o $@ bin/SatSolverDPLL: $(OBJECTS) bin/dpll.o bin/mainDPLL.o $(CC) $(CFLAGS) $^ -o $@ bin/SatSolverGA: $(OBJECTS) bin/ga.o bin/mainGA.o bin/WalkSat.o $(CC) $(CFLAGS) $^ -o $@ bin/WalkSat:$(OBJECTS) bin/WalkSat.o bin/mainWalkSat.o $(CC) $(CFLAGS) $^ -o $@ bin/generateCNF: $(CNFOBJ) $(CC) $(CFLAGS) $^ -o $@ bin/main.o: globalCode/main.c $(CC) -c $(cflags) $^ -o $@ bin/globals.o: globalCode/globals.c $(CC) -c $(cflags) $^ -o $@ bin/generateCNF.o: globalCode/generateCNF.c $(CC) -c $(cflags) $^ -o $@ bin/WalkSat.o: WalkSat/WalkSat.c $(CC) -c $(cflags) $^ -o $@ bin/dpll.o: DPLL/dpll.c $(CC) -c $(cflags) $^ -o $@ bin/ga.o: GA/ga.c $(CC) -c $(cflags) $^ -o $@ bin/mainDPLL.o: globalCode/mainDPLL.c $(CC) -c $(cflags) $^ -o $@ bin/mainGA.o: globalCode/mainGA.c $(CC) -c $(cflags) $^ -o $@ bin/mainWalkSat.o: globalCode/mainWalkSat.c $(CC) -c $(cflags) $^ -o $@ clean: rm -f *.o rm -f bin/*.o rm -f bin/SatSolver rm -f bin/SatSolverDPLL rm -f bin/SatSolverGA rm -f bin/WalkSat rm -f bin/generateCNF