Changeset 33
- Timestamp:
- Jul 27, 2005 3:19:44 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Makefile
r21 r33 1 # define which programs this effects 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 2 10 PROGS = libRpUnits_CInterface \ 3 11 libRpUnits_FInterface \ … … 35 43 # 36 44 37 CFLAGS = -DCOMPNAME_ADD 2UNDERSCORE45 CFLAGS = -DCOMPNAME_ADD1UNDERSCORE 38 46 39 F77= g7747 #F77 = g77 40 48 #F77 = f77 41 49 #F77 = ifort 42 #F77 = /opt/mpich-1.2.6/p4-intel/bin/mpif9050 F77 = /opt/mpich-1.2.6/p4-intel/bin/mpif90 43 51 44 52 LN = ln … … 46 54 # define our directories 47 55 # 48 WORK_DIR = ../work 49 INCLUDES_DIR = ../include 50 SRC_DIR = core 51 FORT_SRC = fortran 52 CEE_SRC = cee 53 PY_SRC = python 54 BIN_DIR = ../bin 55 LIB_DIR = ../lib 56 WORK_DIR = $(RP_BASE)/work 57 INCLUDES_DIR = $(RP_BASE)/include 58 BIN_DIR = $(RP_BASE)/bin 59 LIB_DIR = $(RP_BASE)/lib 60 SRC_DIR = $(RP_BASE)/src 61 62 CORE_SRC = $(SRC_DIR)/core 63 FORT_SRC = $(SRC_DIR)/fortran 64 CEE_SRC = $(SRC_DIR)/cee 65 PY_SRC = $(SRC_DIR)/python 56 66 57 67 #LIB_RPUNITS = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lRpUnits … … 76 86 vpath %.so $(LIB_DIR) 77 87 vpath %.h $(INCLUDES_DIR) 78 #vpath %.c $( SRC_DIR)79 #vpath %.cc $( SRC_DIR)80 #vpath %.tcc $( SRC_DIR)81 #vpath %.cpp $( SRC_DIR)88 #vpath %.c $(CORE_SRC) 89 #vpath %.cc $(CORE_SRC) 90 #vpath %.tcc $(CORE_SRC) 91 #vpath %.cpp $(CORE_SRC) 82 92 83 93 … … 86 96 all: ${PROGS} 87 97 88 #### librappture shared object ########################################### 98 # include rappture library definitions 99 include $(SRC_DIR)/make.inc 89 100 90 libRpUnits_CInterface: $(WORK_DIR)/RpUnitsCInterface.o $(WORK_DIR)/RpUnitsStd.o $(WORK_DIR)/RpUnits.o 91 $(CPP) $(DEGUG) -shared -Wl,-rpath,../lib \ 92 -Wl,-soname,$@.so -o $(LIB_DIR)/$@.so.0.0 $^ -lc 93 94 /sbin/ldconfig -n $(LIB_DIR) 101 # include core source files 102 include $(CORE_SRC)/make.inc 95 103 96 libRpUnits_FInterface: $(WORK_DIR)/RpUnitsStd.o $(WORK_DIR)/RpUnits.o $(WORK_DIR)/RpUnits_fortran.o 97 $(CPP) $(DEBUG) -shared -Wl,-rpath,../lib \ 98 -Wl,-soname,$@.so -o $(LIB_DIR)/$@.so.0.0 $^ -lstdc++ 99 100 /sbin/ldconfig -n $(LIB_DIR) 104 # include cee binding definitions 105 include $(CEE_SRC)/make.inc 101 106 102 librappture: $(WORK_DIR)/rappture_fortran.o $(WORK_DIR)/rappture_interface.o 103 $(CC) $(DEGUG) -shared -Wl,-rpath,../lib \ 104 -Wl,-soname,$@.so -o $(LIB_DIR)/$@.so.0.0 $^ $(EMB_PY_FLAGS) -lstdc++ 105 106 /sbin/ldconfig -n $(LIB_DIR) 107 # include fortran binding definitions 108 include $(FORT_SRC)/make.inc 109 107 110 108 libRapptureIO: $(WORK_DIR)/rappture_fortran.o $(WORK_DIR)/rappture_interface.o109 $(CC) $(DEGUG) -shared -Wl,-rpath,../lib \110 -Wl,-soname,$@.so -o $(LIB_DIR)/$@.so.0.0 $^ $(EMB_PY_FLAGS) -lstdc++111 112 /sbin/ldconfig -n $(LIB_DIR)113 114 115 # -fPIC is for Platform Independent Code, used when creating shared objects.116 117 $(WORK_DIR)/RpUnits.o: $(SRC_DIR)/RpUnits.cc118 $(CPP) -fPIC $(DEBUG) $(INCL_CORE) -o $@ -c $?119 120 $(WORK_DIR)/RpUnitsStd.o: $(SRC_DIR)/RpUnitsStd.cc121 $(CPP) -fPIC $(DEBUG) $(INCL_CORE) -o $@ -c $?122 123 $(WORK_DIR)/RpDict.o: $(SRC_DIR)/RpDict.cc124 $(CPP) -fPIC $(DEBUG) $(INCL_CORE) -o $@ -c $?125 126 $(WORK_DIR)/rappture_interface.o: $(CEE_SRC)/rappture_interface.c127 $(CPP) -fPIC $(DEBUG) $(INCL_CEE) -o $(WORK_DIR)/$@ -c $<128 129 $(WORK_DIR)/RpUnitsCInterface.o: $(CEE_SRC)/RpUnitsCInterface.cc130 $(CPP) $(CFLAGS) -fPIC $(DEBUG) $(INCL_CORE) $(INCL_CEE) -o $@ -c $?131 132 $(WORK_DIR)/RpUnits_fortran.o: $(FORT_SRC)/RpUnits_fortran.c133 $(CPP) $(CFLAGS) -fPIC $(DEBUG) $(INCL_CORE) -o $@ -c $?134 135 $(WORK_DIR)/rappture_fortran.o: $(FORT_SRC)/rappture_fortran.c136 $(CPP) $(CFLAGS) -fPIC $(DEBUG) $(INCL_CORE) $(INCL_CEE) -o $(WORK_DIR)/$@ -c $<137 138 139 111 #### CLEAN UP ############################################################ 140 112 clean: 141 - rm -f $(BIN_DIR)/* $(WORK_DIR)/*.o 113 - rm -f $(BIN_DIR)/* $(WORK_DIR)/*.o $(LIB_DIR)/librappture.* $(LIB_DIR)/libR*.so*
Note: See TracChangeset
for help on using the changeset viewer.