Merge remote-tracking branch 'origin/release-v4.6.1'
[WRF.git] / external / io_grib_share / build / compile_rules.mk
blob49265c66ecadf5dd981dff34d4924e9cb0417add
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.
9 #
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.
16 SHELL=/bin/sh
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
28 .C.o:
29 $(CXX) $(SYS_CXX_INCLUDES) $(SYS_C_INCLUDES) $(CXX_INCLUDES) $(CXXFLAGS) $(SYS_DEFINES) $(DEBUG) -c $<
30 .c.o:
31 $(CC) $(SYS_C_INCLUDES) $(C_INCLUDES) $(CFLAGS) $(SYS_DEFINES) $(DEBUG) -c $<
32 .cxx.o:
33 $(CXX) $(SYS_CXX_INCLUDES) $(SYS_C_INCLUDES) $(CXX_INCLUDES) $(CXXFLAGS) $(SYS_DEFINES) $(DEBUG) -c $<
34 .cpp.o:
35 $(CXX) $(SYS_CXX_INCLUDES) $(SYS_C_INCLUDES) $(CXX_INCLUDES) $(CXXFLAGS) $(SYS_DEFINES) $(DEBUG) -c $<
37 .F90.o:
38 $(FC) $(SYS_F_INCLUDES) $(F_INCLUDES) $(FCFLAGS) $(SYS_DEFINES) $(DEBUG) $(FORMAT) -c $<
40 .F.o:
41 $(RM) $@
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
45 .f90.o:
46 $(FC) $(SYS_F_INCLUDES) $(F_INCLUDES) $(FCFLAGS) $(SYS_DEFINES) $(DEBUG) $(FORMAT) -c $<