1 #------------------------------------------------------------------------------
2 # Make rules for compiling source code files.
4 # This file is intended for use in a Makefile via the include directive, e.g.
6 # include $(BUILD_DIR)/compile_rules.mk
8 # It may also be include by other rule files in this directory.
10 # Copyright (C) 2001, WSI Corporation
11 #------------------------------------------------------------------------------
13 # For portability, use the Bourne shell within Makefiles.
14 # There have been problems using the C-shell under Linux.
19 # Define all the extensions and include directories we will handle in the
20 # compile rules. Currently it is just C and C++.
22 SRC_EXTENSIONS
=.C .c .
cpp .
cxx .F90 .F .f90
25 # RULES for compilation of C and C++ code
27 .SUFFIXES
: .c .C .
cpp .
cxx .F90 .F .f90
29 $(CXX
) $(SYS_CXX_INCLUDES
) $(SYS_C_INCLUDES
) $(CXX_INCLUDES
) $(CXXFLAGS
) $(SYS_DEFINES
) $(DEBUG
) -c
$<
31 $(CC
) $(SYS_C_INCLUDES
) $(C_INCLUDES
) $(CFLAGS
) $(SYS_DEFINES
) $(DEBUG
) -c
$<
33 $(CXX
) $(SYS_CXX_INCLUDES
) $(SYS_C_INCLUDES
) $(CXX_INCLUDES
) $(CXXFLAGS
) $(SYS_DEFINES
) $(DEBUG
) -c
$<
35 $(CXX
) $(SYS_CXX_INCLUDES
) $(SYS_C_INCLUDES
) $(CXX_INCLUDES
) $(CXXFLAGS
) $(SYS_DEFINES
) $(DEBUG
) -c
$<
38 $(FC
) $(SYS_F_INCLUDES
) $(F_INCLUDES
) $(FCFLAGS
) $(SYS_DEFINES
) $(DEBUG
) $(FORMAT
) -c
$<
42 $(CPP
) $(CPPFLAGS
) $(TRADFLAG
) $(SYS_F_INCLUDES
) $(F_INCLUDES
) $*.F
> $*.f90
43 $(FC
) $(SYS_F_INCLUDES
) $(FCSUFFIX
) $(F_INCLUDES
) $(FCFLAGS
) $(SYS_DEFINES
) $(DEBUG
) $(FORMAT
) -c
$*.f90
46 $(FC
) $(SYS_F_INCLUDES
) $(F_INCLUDES
) $(FCFLAGS
) $(SYS_DEFINES
) $(DEBUG
) $(FORMAT
) -c
$<