source: trunk/src/Makefile @ 41

Last change on this file since 41 was 41, checked in by dkearney, 19 years ago

added makefile to compile Rappture Core Data Structure tests

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