######################### -*- Mode: Makefile-Gmake -*- ######################## ## ## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo ## ## The contents of this file are covered under the licence agreement in the ## file "LICENCE" distributed with Cforall. ## ## Makefile.in -- ## ## Author : Peter A. Buhr ## Created On : Sat May 16 11:34:24 2015 ## Last Modified By : Peter A. Buhr ## Last Modified On : Sat May 16 11:35:25 2015 ## Update Count : 2 ############################################################################### CC := @CFA_BINDIR@/cfa CFLAGS = -g -Wall -Wno-unused-function -MMD MAKEFILE_NAME = ${firstword ${MAKEFILE_LIST}} # makefile name OBJECTS1 = iostream.o fstream.o fstream_test.o EXEC1 = fstream_test OBJECTS2 = vector_int.o fstream.o iostream.o array.o iterator.o vector_test.o EXEC2 = vector_test OBJECTS = ${OBJECTS1} ${OBJECTS2} # all object files DEPENDS = ${OBJECTS:.o=.d} # substitute ".o" with ".d" EXECS = ${EXEC1} ${EXEC2} # all executables ########## Targets ########## .PHONY : all clean # not file names all : ${EXECS} # build all executables ${EXEC1} : ${OBJECTS1} # link step 1st executable ${CC} ${CFLAGS} $^ -o $@ # additional object files before $^ ${EXEC2} : ${OBJECTS2} # link step 2nd executable ${CC} ${CFLAGS} $^ -o $@ # additional object files before $^ ${OBJECTS} : ${MAKEFILE_NAME} # OPTIONAL : changes to this file => recompile -include ${DEPENDS} # include *.d files containing program dependences clean : # remove files that can be regenerated rm -f ${DEPENDS} ${OBJECTS} ${EXECS} *.class distclean : clean