# Simple default Makefile for compiling executables SHELL = /bin/sh CC = g++-2.95 # For every new .C file created, you must add a corresponding .o to OBJS. #OBJS = distance.o mainDistance.o OBJS = main.o # Name of the executable. EXEC = ng CFLAGS = -g #CFLAGS = -fast -native # Directories to search when we #include . (/usr/include is # searched implicitly.) # By specifying '-I.' first, using quotes or brackets for #includes are # the same. IFLAGS = -I. \ -I/usr/include \ # Flags to CC during linking: LIBS = #-lmath LFLAGS = /cfarm/nag/libraries/fll3a21dgl/lib/libnag_nag.a \ -llapack -lblas -lpthread # We always depend on EXEC. all: $(EXEC) # To create $(EXEC), we invoke CC to link everything together. $(EXEC): $(OBJS) $(CC) -o $@ $(OBJS) $(CFLAGS) $(LFLAGS) # We compile .cc files to their corresponding .o in OBJS. dont forget .cc or .CC makes difference in the build target below .cpp.o: $(CC) $(CFLAGS) $(IFLAGS) -c $< # makedepend checks file dependencies and makes sure that everything # that needs to be compiled is compiled. It's not an entirely speedy # process, but you should run it after adding header files and/or # making significant changes to your code base. depend: makedepend $(IFLAGS) *.cpp clean: rm -f $(EXEC) rm -rf Templates.DB rm -f *.o core *~ new: $(MAKE) clean $(MAKE) depend $(MAKE) $(EXEC)