############################################################################## # Here is a simple Makefile which compiles and links a program test.cxx and # uses the QUANTA library. ############################################################################## ############################################################################## # Step 1: Decide the binary type that you are using # so QUANTA_BIN_TYPE can be given 32,n32 or 64 (check which type your platform # supports ############################################################################## QUANTA_BIN_TYPE=n32 QUANTA_THREAD_TYPE=pthreads ############################################################################## # Step 2: Include the location of the QUANTA_APPLICATION_INCLUDES # In this example /usr/local is the installation directory ############################################################################## include /usr/local/include/QUANTA/QUANTA_APPLICATION_INCLUDES ############################################################################## # Step 3: Define the include directory path and library path as shown below. # Use $(QUANTA_CFLAGS) when you compile your source code and $(QUANTA_LIB) # when you want to create executables. ############################################################################## INCLUDE_DIR = -I/usr/local/include LIBRARY_DIR = -L/usr/local/lib/ LIBRARIES = $(QUANTA_LIB) -lm -lpthread COMPILER_FLAGS = -O $(QUANTA_CFLAGS) COMPILER = $(CPPCOMPILER) OBJ_FILES = test.o EXEC = test $(EXEC): $(OBJ_FILES) $(COMPILER) $(COMPILER_FLAGS) -o $(EXEC) $(OBJ_FILES) \ $(LIBRARY_DIR) $(LIBRARIES) test.o: test.cxx $(COMPILER) $(COMPILER_FLAGS) $(INCLUDE_DIR) -c test.cxx clean: \rm -f $(OBJ_FILES) $(EXEC)