- Timestamp:
- Oct 6, 2005, 9:29:46 AM (19 years ago)
- 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 2 RP_BASE = /opt/rappture 23 3 24 4 # define our compiling environment 25 5 # 26 AR = ar 27 CC = gcc 28 CPP = g++ 6 CC = gcc 7 CPP = g++ 29 8 DEBUG = -g -Wall 30 9 DEBUG_PLUS = -g -DDEBUG 31 10 32 # FORTRAN BINDINGS COMPILER FLAGS33 #34 # available flags35 #36 # COMPNAME_NOCHANGE - No change to the Rappture Library function37 # name38 # COMPNAME_UPPERCASE - Replace the Rappture Library function name39 # with an all uppercase version of the name40 # COMPNAME_ADD1UNDERSCORE - add 1 underscore to the end of the Rappture41 # Library function name42 # COMPNAME_ADD2UNDERSCORE - add 2 underscores to the end of the Rappture43 # Library function name44 #45 # when setting CFLAGS, use the following guide for help46 #47 # gnu's g77/f77 COMPNAME_ADD2UNDERSCORE48 # absoft's f77 COMPNAME_ADD1UNDERSCORE49 # intel's ifort COMPNAME_ADD1UNDERSCORE50 # intel's mpif90 COMPNAME_ADD1UNDERSCORE51 #52 #53 54 CFLAGS = -DCOMPNAME_ADD2UNDERSCORE55 56 F77 = g7757 #F77 = f7758 #F77 = ifort59 #F77 = /opt/mpich-1.2.6/p4-intel/bin/mpif9060 61 LN = ln62 63 11 # define our directories 64 12 # 65 WORK_DIR = $(RP_BASE)/work66 13 INCLUDES_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 14 INCL_CEE = -I $(INCLUDES_DIR)/cee 15 INCL_CORE = -I $(INCLUDES_DIR)/core 16 INCL_PY = -I $(INCLUDES_DIR)/python2.4 71 17 72 CORE_SRC = $(SRC_DIR)/core 73 FORT_SRC = $(SRC_DIR)/fortran 74 CEE_SRC = $(SRC_DIR)/cee 75 PY_SRC = $(SRC_DIR)/python 18 LIB_DIR = $(RP_BASE)/lib 19 LIB_INC_PREFIX = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) 20 LIB_RAPPTURE = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture 76 21 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 22 plot: plot.cc 23 $(CPP) $(DEBUG) -DDEBUG $(INCL_CEE) $(INCL_CORE) $(INCL_PY) -o $@ $< $(LIB_RAPPTURE) 140 24 141 25 #### CLEAN UP ############################################################ 142 26 clean: 143 27 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.