Changeset 73 for trunk/src/Makefile
- Timestamp:
- Sep 28, 2005, 12:09:43 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Makefile
r41 r73 1 # you need to change this to where your version of python is installed. 2 # tell make where to find python header files 3 PY_SRC_HEADERS = /opt/rappture/include/python2.4 4 5 # tell make where to find the python shared library 6 EMB_PY_LIB_FLAG = -lpython2.4 7 EMB_PY_LIB_DIR = /opt/rappture/lib 8 9 EMB_PY_FLAGS = -Wl,-rpath,$(EMB_PY_LIB_DIR) -L$(EMB_PY_LIB_DIR) $(EMB_PY_LIB_FLAG) 10 11 # everything below should be ok, but check to make sure 12 # especially check the fortran flags, if youre using fortran 13 # 1 14 # define the top of our directory structure 2 15 # replace this with the full path of the directory … … 8 21 9 22 # 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 23 PROGS = librappture \ 24 libRpObjects \ 22 25 23 26 # define our compiling environment 24 27 # 25 AR = ar26 28 CC = gcc 27 29 CPP = g++ … … 62 64 # define our directories 63 65 # 64 WORK_DIR = $(RP_BASE)/work65 66 INCLUDES_DIR = $(RP_BASE)/include 66 67 BIN_DIR = $(RP_BASE)/bin 67 LIB_DIR = $(RP_BASE)/ lib68 LIB_DIR = $(RP_BASE)/src 68 69 SRC_DIR = $(RP_BASE)/src 69 70 TEST_DIR = $(RP_BASE)/test … … 74 75 PY_SRC = $(SRC_DIR)/python 75 76 76 #LIB_RPUNITS = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lRpUnits77 #LIB_RPDICT = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lRpDict78 79 77 LIB_INC_PREFIX = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) 80 81 #LIB_RPUNITS_C = $(LIB_INC_PREFIX) -lRpUnits_CInterface 82 #LIB_RAPPTUREIO = $(LIB_INC_PREFIX) -lrappture 83 84 LIB_RP_UNITS = $(LIB_INC_PREFIX) -lRpUnits 85 LIB_RP_VARIABLE = $(LIB_INC_PREFIX) -lRpVariable 86 LIB_RP_NUMBER = $(LIB_INC_PREFIX) -lRpNumber 87 LIB_RP_STRING = $(LIB_INC_PREFIX) -lRpString 88 LIB_RP_BOOLEAN = $(LIB_INC_PREFIX) -lRpBoolean 89 LIB_RP_OPTION = $(LIB_INC_PREFIX) -lRpOption 90 LIB_RP_CHOICE = $(LIB_INC_PREFIX) -lRpChoice 91 LIB_RP_PRESET = $(LIB_INC_PREFIX) -lRpPreset 92 93 94 LIB_RPUNITS_C = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lRpUnits_CInterface 95 LIB_RPUNITS_F = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lRpUnits_FInterface 78 LIB_RP_OBJECTS = $(LIB_INC_PREFIX) -lRpObjects 96 79 LIB_RAPPTURE = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture 97 LIB_RAPPTUREIO = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lRapptureIO98 80 99 81 INCL_CORE = -I $(INCLUDES_DIR)/core 100 INCL_CEE = -I $(INCLUDES_DIR)/cee 82 INCL_CEE = -I $(INCLUDES_DIR)/cee -I $(PY_SRC_HEADERS) 101 83 INCL_FORTRAN = -I $(INCLUDES_DIR)/fortran 102 84 INCL_PY = -I $(INCLUDES_DIR)/python 103 104 # you need to change this to where your version of python is installed.105 EMB_PY_FLAGS = -L$(LIB_DIR) -lpython2.4106 107 # tell make where to find files of each specific type108 #109 vpath %.o $(WORK_DIR)110 vpath %.so $(LIB_DIR)111 vpath %.h $(INCLUDES_DIR)112 #vpath %.c $(CORE_SRC)113 #vpath %.cc $(CORE_SRC)114 #vpath %.tcc $(CORE_SRC)115 #vpath %.cpp $(CORE_SRC)116 85 117 86 … … 121 90 122 91 # include rappture library definitions 123 include $(SRC_DIR)/make.inc 92 93 #### librappture shared object ########################################### 94 95 librappture: rappture_fortran.o rappture_interface.o RpUnitsCInterface.o RpUnitsStd.o RpUnits.o 96 $(CPP) $(DEGUG) -shared -Wl,-rpath,$(LIB_DIR)/ \ 97 -Wl,-soname,$@.so -o $(LIB_DIR)/$@.so.0.0 $^ $(EMB_PY_FLAGS) 98 99 /sbin/ldconfig -n $(LIB_DIR) 100 101 102 #### libRpObjects ######################################################## 103 libRpObjects: RpVariable.o RpAbout.o RpNumber.o RpString.o RpBoolean.o RpChoice.o RpOption.o RpUnitsStd.o RpUnits.o 104 $(CPP) $(DEGUG) -shared -Wl,-rpath,$(LIB_DIR)/ \ 105 -Wl,-soname,$@.so -o $(LIB_DIR)/$@.so.0.0 $^ -lc 106 107 /sbin/ldconfig -n $(LIB_DIR) 108 124 109 125 110 # include core source files 126 include $(CORE_SRC)/make.inc 111 112 Rp%.o: $(CORE_SRC)/Rp%.cc 113 $(CPP) -fPIC $(DEBUG) $(INCL_CORE) -o $@ -c $? 127 114 128 115 # include cee binding definitions 129 include $(CEE_SRC)/make.inc 116 117 rappture_interface.o: $(CEE_SRC)/rappture_interface.c 118 $(CPP) -fPIC $(DEBUG) $(INCL_CEE) $(INCL_PY) -o $@ -c $< 119 120 RpUnitsCInterface.o: $(CEE_SRC)/RpUnitsCInterface.cc 121 $(CPP) $(CFLAGS) -fPIC $(DEBUG) $(INCL_CORE) $(INCL_CEE) -o $@ -c $? 130 122 131 123 # include fortran binding definitions 132 include $(FORT_SRC)/make.inc133 124 134 # include test programs 135 include $(TEST_DIR)/make.inc 125 RpUnits_fortran.o: $(FORT_SRC)/RpUnits_fortran.c 126 $(CPP) $(CFLAGS) -fPIC $(DEBUG) $(INCL_CORE) -o $@ -c $? 127 128 rappture_fortran.o: $(FORT_SRC)/rappture_fortran.c 129 $(CPP) $(CFLAGS) -fPIC $(DEBUG) $(INCL_CORE) $(INCL_CEE) $(INCL_PY) -o $@ -c $< 136 130 137 131 #### CLEAN UP ############################################################ 138 132 clean: 139 - rm -f $(BIN_DIR)/* $(WORK_DIR)/*.o $(LIB_DIR)/librappture.* $(LIB_DIR)/libR*.so*133 - rm -f $(BIN_DIR)/* *.o librappture.* libR*.so*
Note: See TracChangeset
for help on using the changeset viewer.