#
# This is the Makefile for the flight simulator.
#

COMPILE=g++
#COMPILE=CC
INC_DIR=$(HOME)
LIB_DIR=$(HOME)
INCLUDE=-I$(INC_DIR)/Matrix/include \
#	-I$(INC_DIR)/Matrix/libg++/include
LIBRARY=-L$(LIB_DIR)/Matrix/lib \
#	-L$(LIB_DIR)/Matrix/libg++/lib
EXECUTE=src/simulate

      all: $(EXECUTE) network.old perturb

 $(EXECUTE):
	(cd src; make)

network.old: perturb network.src weights
	(perturb -v < network.src > network.old; cat weights >> network.old)

  perturb: perturb.C
	$(COMPILE) $(INCLUDE) $(LIBRARY) -O -o perturb perturb.C \
	-lMatrix -lg++ -lm

      tar:
	(cd ..; tar cvf simulator.tar simulator; compress simulator.tar)

    clean:
	rm -f core perturb network.old network.new

