source: trunk/test/Makefile @ 83

Last change on this file since 83 was 83, checked in by dkearney, 17 years ago
  1. More cleaning of RpUnits and RpLibrary? code
  2. added rp_result code to c++/fortran/c code
  3. added rp_children, rp_lib_node[comp,type,id] for fortran code (need to test)
  4. adjusted convert function to recognize statements as follows:

convert("5J","neV")
convert("3.12075e+28neV","J")

  1. made joules a metric unit in RpUnits.cc
  2. tested examples/app-fermi/fortran/fermi.f with new rappture library.

added units conversion.

File size: 3.9 KB
Line 
1
2# tell make where to find the libscew sources
3SCEW_HEADERS    = /opt/rappture/include/scew
4LIB_SCEW_INCL   = -I $(SCEW_HEADERS)
5LIB_SCEW_FLAG   = -L/opt/rappture/lib -lscew
6#LIB_SCEW_FLAG  = -static -L/opt/rappture/lib -lscew
7
8# define the top of our directory structure
9# replace this with the full path of the directory
10# containing the rappture directory
11TOP_DIR         = ../..
12
13# define the top of the rappture directory structure
14RP_BASE         = $(TOP_DIR)/rappture
15
16# define which programs can be made
17
18TEST_PROGS      = RpBoolean_test    \
19                  RpChoice_test     \
20                  RpNumber_test     \
21                  RpString_test     \
22                  RpUnits_test      \
23                  RpVariable_test   \
24                  RpUnitsC_test     \
25                  RpUnitsF_test     \
26                  RpLibrary_test    \
27                  RpLibraryC_test
28
29# define our compiling environment
30#
31CC              = gcc
32CXX             = g++
33DEBUG           = -g -Wall
34DEBUG_PLUS      = -g -DDEBUG
35
36# FORTRAN BINDINGS COMPILER FLAGS
37#
38# available flags
39#
40#   COMPNAME_NOCHANGE           No change to the Rappture Library function
41#                                 name
42#   COMPNAME_UPPERCASE          Replace the Rappture Library function name
43#                                 with an all uppercase version of the name
44#   COMPNAME_ADD1UNDERSCORE     Add 1 underscore to the end of the Rappture
45#                                 Library function name
46#   COMPNAME_ADD2UNDERSCORE     Add 2 underscores to the end of the Rappture
47#                                 Library function name
48#
49# when setting CFLAGS, use the following guide for help
50#
51# gnu's g77/f77         COMPNAME_ADD2UNDERSCORE
52# absoft's f77          COMPNAME_ADD1UNDERSCORE
53# intel's ifort         COMPNAME_ADD1UNDERSCORE
54# intel's mpif90        COMPNAME_ADD1UNDERSCORE
55#
56#
57
58CFLAGS          = -DCOMPNAME_ADD2UNDERSCORE
59
60F77             = g77
61
62LN              = ln
63
64# define our directories
65#
66INCLUDES_DIR    = $(RP_BASE)/include
67BIN_DIR         = $(RP_BASE)/bin
68LIB_DIR         = $(RP_BASE)/src
69SRC_DIR         = $(RP_BASE)/src
70TEST_DIR        = $(RP_BASE)/test
71
72LIB_INC_PREFIX  = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR)
73
74LIB_RP_OBJECTS  = $(LIB_INC_PREFIX) -lRpObjects
75LIB_RAPPTURE    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
76LIB_RAPPTURE_T  = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture_test
77
78INCL_CORE       = -I $(INCLUDES_DIR)/core
79INCL_CEE        = -I $(INCLUDES_DIR)/cee
80INCL_FORTRAN    = -I $(INCLUDES_DIR)/fortran
81INCL_PY         = -I $(INCLUDES_DIR)/python
82
83
84default: $(TEST_PROGS)
85all: $(TEST_PROGS)
86test: $(TEST_PROGS)
87
88# include test programs
89
90SRC_TEST            = $(TEST_DIR)/src
91
92
93RpBoolean_test: $(SRC_TEST)/RpBoolean_test.cc
94        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
95   
96RpChoice_test: $(SRC_TEST)/RpChoice_test.cc
97        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
98   
99RpNumber_test: $(SRC_TEST)/RpNumber_test.cc
100        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
101
102RpString_test: $(SRC_TEST)/RpString_test.cc
103        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
104
105RpUnits_test: $(SRC_TEST)/RpUnits_test.cc
106        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RAPPTURE)
107
108RpVariable_test: $(SRC_TEST)/RpVariable_test.cc
109        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
110
111RpUnitsC_test: $(SRC_TEST)/RpUnitsC_test.c
112        $(CC) $(DEBUG) $(INCL_CEE) $(INCL_CORE) -o $@ $^ $(LIB_RAPPTURE_T)
113
114RpLibrary_test: $(SRC_TEST)/RpLibrary_test.cc
115        $(CXX) $(DEBUG) $(INCL_CEE) $(INCL_CORE) $(LIB_SCEW_INCL) -o $@ $^ $(LIB_RAPPTURE_T)
116
117RpLibraryC_test: $(SRC_TEST)/RpLibraryC_test.c
118        $(CC) $(DEBUG) $(INCL_CEE) $(INCL_CORE) $(LIB_SCEW_INCL) -o $@ $^ $(LIB_RAPPTURE_T)
119
120RpLibraryF_test: $(SRC_TEST)/RpLibraryF_test.f
121        $(F77) $(DEBUG) -o $@ $^ $(LIB_RAPPTURE_T)
122
123RpUnitsF_test: $(SRC_TEST)/RpUnitsF_test.f
124        $(F77) $(DEBUG) -o $@ $^ $(LIB_RAPPTURE_T)
125
126
127#### CLEAN UP ############################################################
128clean:
129        - rm -f *.o $(TEST_PROGS)
Note: See TracBrowser for help on using the repository browser.