Changeset 89 for trunk


Ignore:
Timestamp:
Oct 6, 2005, 9:29:46 AM (19 years ago)
Author:
cxsong
Message:

update

Location:
trunk/examples/c-example
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/c-example/Makefile

    r61 r89  
    1 # define the top of our directory structure
    2 # replace this with the full path of the directory
    3 # containing the rappture directory
    4 TOP_DIR         = ../../..
    5 
    6 # define the top of the rappture directory structure
    7 RP_BASE   = $(TOP_DIR)/rappture
    8 
    9 # define which programs can be made
    10 #PROGS                  =       libRpUnits_CInterface   \
    11 #                                       libRpUnits_FInterface   \
    12 #                                       librappture                             \
    13 #                                       libRapptureIO                   \
    14 #                                       libRpUnits                              \
    15 #                                       libRpVariable                   \
    16 #                                       libRpNumber                             \
    17 #                                       libRpString                             \
    18 #                                       libRpBoolean                    \
    19 #                                       libRpChoice                             \
    20 #                                       libRpOption                             
    21 PROGS = plot
    22                                        
     1# define rappture src directory
     2RP_BASE = /opt/rappture
    233
    244# define our compiling environment
    255#
    26 AR                              = ar
    27 CC                              = gcc
    28 CPP                             = g++
     6CC                      = gcc
     7CPP                     = g++
    298DEBUG                   = -g -Wall
    309DEBUG_PLUS              = -g -DDEBUG
    3110
    32 # FORTRAN BINDINGS COMPILER FLAGS
    33 #
    34 # available flags
    35 #
    36 #       COMPNAME_NOCHANGE               -       No change to the Rappture Library function
    37 #                                                               name
    38 #       COMPNAME_UPPERCASE      -       Replace the Rappture Library function name
    39 #                                                               with an all uppercase version of the name
    40 #       COMPNAME_ADD1UNDERSCORE -       add 1 underscore to the end of the Rappture
    41 #                                                               Library function name
    42 #       COMPNAME_ADD2UNDERSCORE -       add 2 underscores to the end of the Rappture
    43 #                                                               Library function name
    44 #
    45 # when setting CFLAGS, use the following guide for help
    46 #
    47 # gnu's g77/f77                 COMPNAME_ADD2UNDERSCORE
    48 # absoft's f77                  COMPNAME_ADD1UNDERSCORE
    49 # intel's ifort                 COMPNAME_ADD1UNDERSCORE
    50 # intel's mpif90                COMPNAME_ADD1UNDERSCORE
    51 #
    52 #
    53 
    54 CFLAGS                  = -DCOMPNAME_ADD2UNDERSCORE
    55 
    56 F77                     = g77
    57 #F77                            = f77
    58 #F77                            = ifort
    59 #F77                            = /opt/mpich-1.2.6/p4-intel/bin/mpif90
    60 
    61 LN              = ln
    62 
    6311# define our directories
    6412#
    65 WORK_DIR                = $(RP_BASE)/work
    6613INCLUDES_DIR    = $(RP_BASE)/include
    67 BIN_DIR                 = $(RP_BASE)/bin
    68 LIB_DIR                 = $(RP_BASE)/lib
    69 SRC_DIR                 = $(RP_BASE)/src
    70 TEST_DIR                = $(RP_BASE)/test
     14INCL_CEE        = -I $(INCLUDES_DIR)/cee
     15INCL_CORE       = -I $(INCLUDES_DIR)/core
     16INCL_PY         = -I $(INCLUDES_DIR)/python2.4
    7117
    72 CORE_SRC                = $(SRC_DIR)/core
    73 FORT_SRC                = $(SRC_DIR)/fortran
    74 CEE_SRC                 = $(SRC_DIR)/cee
    75 PY_SRC                  = $(SRC_DIR)/python
     18LIB_DIR         = $(RP_BASE)/lib
     19LIB_INC_PREFIX  = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR)
     20LIB_RAPPTURE    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
    7621
    77 #LIB_RPUNITS    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lRpUnits
    78 #LIB_RPDICT             = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lRpDict
    79 
    80 LIB_INC_PREFIX  = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR)
    81 
    82 #LIB_RPUNITS_C   = $(LIB_INC_PREFIX) -lRpUnits_CInterface
    83 #LIB_RAPPTUREIO  = $(LIB_INC_PREFIX) -lrappture
    84 
    85 LIB_RP_UNITS    = $(LIB_INC_PREFIX) -lRpUnits
    86 LIB_RP_VARIABLE = $(LIB_INC_PREFIX) -lRpVariable
    87 LIB_RP_NUMBER   = $(LIB_INC_PREFIX) -lRpNumber
    88 LIB_RP_STRING   = $(LIB_INC_PREFIX) -lRpString
    89 LIB_RP_BOOLEAN  = $(LIB_INC_PREFIX) -lRpBoolean
    90 LIB_RP_OPTION   = $(LIB_INC_PREFIX) -lRpOption
    91 LIB_RP_CHOICE   = $(LIB_INC_PREFIX) -lRpChoice
    92 LIB_RP_PRESET   = $(LIB_INC_PREFIX) -lRpPreset
    93 
    94 
    95 LIB_RPUNITS_C   = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lRpUnits_CInterface
    96 LIB_RPUNITS_F   = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lRpUnits_FInterface
    97 LIB_RAPPTURE    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
    98 LIB_RAPPTUREIO  = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lRapptureIO
    99 
    100 INCL_CORE               = -I $(INCLUDES_DIR)/core
    101 INCL_CEE                = -I $(INCLUDES_DIR)/cee
    102 INCL_FORTRAN    = -I $(INCLUDES_DIR)/fortran
    103 INCL_PY                 = -I $(INCLUDES_DIR)/python
    104 
    105 # you need to change this to where your version of python is installed.
    106 EMB_PY_FLAGS    = -L$(LIB_DIR) -lpython2.4
    107 
    108 # tell make where to find files of each specific type
    109 #
    110 vpath %.o $(WORK_DIR)
    111 vpath %.so $(LIB_DIR)
    112 vpath %.h $(INCLUDES_DIR)
    113 #vpath %.c $(CORE_SRC)
    114 #vpath %.cc $(CORE_SRC)
    115 #vpath %.tcc $(CORE_SRC)
    116 #vpath %.cpp $(CORE_SRC)
    117 
    118 
    119 # default:
    120 
    121 all: ${PROGS} plot
    122 
    123 # include rappture library definitions
    124 #include $(SRC_DIR)/make.inc
    125 
    126 # include core source files
    127 #include $(CORE_SRC)/make.inc
    128 
    129 # include cee binding definitions
    130 #include $(CEE_SRC)/make.inc
    131 
    132 # include fortran binding definitions
    133 #include $(FORT_SRC)/make.inc
    134 
    135 # include test programs
    136 #include $(TEST_DIR)/make.inc
    137 
    138 # include new example
    139 include $(RP_BASE)/examples/c-example/make.inc
     22plot: plot.cc
     23        $(CPP) $(DEBUG) -DDEBUG $(INCL_CEE) $(INCL_CORE) $(INCL_PY) -o $@ $< $(LIB_RAPPTURE)
    14024
    14125#### CLEAN UP ############################################################
    14226clean:
    14327        rm -f plot
    144 #clean:
    145 #       - rm -f $(BIN_DIR)/* $(WORK_DIR)/*.o $(LIB_DIR)/librappture.* $(LIB_DIR)/libR*.so*
Note: See TracChangeset for help on using the changeset viewer.