# (C) 2002 Jasper Bedaux, ITFA, University of Amsterdam # http://www.bedaux.net/jasper/ # GNU Makefile for neural network simulations 'brain' SHELL = /bin/sh # shell to use .SUFFIXES: # clear defaults .SUFFIXES: .cpp .o .h # define suffixes CXX = g++ # C++ compiler #CXX = aCC # HPUX C++ compiler, thanks to J. Alberto Agudo Huertas # options to compiler, e.g. debugging or optimization options CXXFLAGS = -O3 -m486 -Wall # for x86 #CXXFLAGS = -O3 -Wall -R/opt/arch/gcc-3.0.1/lib # for Sparc Solaris #CXXFLAGS = -g0 -w -AA -mt -fast +DAportable +Z # for HPUX 11 RISC, thanks to J. Alberto Agudo Huertas objects = brain.o neural_net.o io_patterns.o mtrand.o # dependency of program file on object files and # rule to make program file from the object files brain : $(objects) $(CXX) $(CXXFLAGS) $(objects) -o $@ # rule to make *.o objects from *.cpp source files %.o : %.cpp $(CXX) -c $(CXXFLAGS) $< -o $@ # dependencies of object files on header files brain.o : neural_net.h io_patterns.h mtrand.h read_parms.h neural_net.o : neural_net.h mtrand.h io_patterns.o : io_patterns.h mtrand.h mtrand.o : mtrand.h # phony target clean to clean intermediate files # use 'make clean' to clean up intermediate files .PHONY : clean clean : -rm -f *.o