source: trunk/test/Makefile @ 76

Last change on this file since 76 was 76, checked in by dkearney, 15 years ago
  1. cleaned up make files some more, deleted make.inc files
  2. updated RpUnits module and Cee and Fortran interfaces
  3. changed return values for some fortran interfaces,

error messages not working yet

  1. still need to add copy assignment code to RpUnits
File size: 3.0 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
10                                       
11TEST_PROGS          = RpBoolean_test    \
12                      RpChoice_test     \
13                      RpNumber_test     \
14                      RpString_test     \
15                      RpUnits_test      \
16                      RpVariable_test   \
17                      RpUnitsC_test             \
18                      RpUnitsF_test
19
20# define our compiling environment
21#
22CC                              = gcc
23CXX                             = g++
24DEBUG                   = -g -Wall
25DEBUG_PLUS              = -g -DDEBUG
26
27# FORTRAN BINDINGS COMPILER FLAGS
28#
29# available flags
30#
31#       COMPNAME_NOCHANGE               -       No change to the Rappture Library function
32#                                                               name
33#       COMPNAME_UPPERCASE      -       Replace the Rappture Library function name
34#                                                               with an all uppercase version of the name
35#       COMPNAME_ADD1UNDERSCORE -       add 1 underscore to the end of the Rappture
36#                                                               Library function name
37#       COMPNAME_ADD2UNDERSCORE -       add 2 underscores to the end of the Rappture
38#                                                               Library function name
39#
40# when setting CFLAGS, use the following guide for help
41#
42# gnu's g77/f77                 COMPNAME_ADD2UNDERSCORE
43# absoft's f77                  COMPNAME_ADD1UNDERSCORE
44# intel's ifort                 COMPNAME_ADD1UNDERSCORE
45# intel's mpif90                COMPNAME_ADD1UNDERSCORE
46#
47#
48
49CFLAGS                  = -DCOMPNAME_ADD2UNDERSCORE
50
51F77                     = g77
52
53LN              = ln
54
55# define our directories
56#
57INCLUDES_DIR    = $(RP_BASE)/include
58BIN_DIR                 = $(RP_BASE)/bin
59LIB_DIR                 = $(RP_BASE)/src
60SRC_DIR                 = $(RP_BASE)/src
61TEST_DIR                = $(RP_BASE)/test
62
63LIB_INC_PREFIX  = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR)
64
65LIB_RP_OBJECTS  = $(LIB_INC_PREFIX) -lRpObjects
66LIB_RAPPTURE    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
67
68INCL_CORE               = -I $(INCLUDES_DIR)/core
69INCL_CEE                = -I $(INCLUDES_DIR)/cee
70INCL_FORTRAN    = -I $(INCLUDES_DIR)/fortran
71INCL_PY                 = -I $(INCLUDES_DIR)/python
72
73# default:
74
75all: $(TEST_PROGS)
76test: $(TEST_PROGS)
77
78# include test programs
79
80SRC_TEST            = $(TEST_DIR)/src
81
82
83RpBoolean_test: $(SRC_TEST)/RpBoolean_test.cc
84        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
85   
86RpChoice_test: $(SRC_TEST)/RpChoice_test.cc
87        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
88   
89RpNumber_test: $(SRC_TEST)/RpNumber_test.cc
90        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
91
92RpString_test: $(SRC_TEST)/RpString_test.cc
93        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
94
95RpUnits_test: $(SRC_TEST)/RpUnits_test.cc
96        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RAPPTURE)
97
98RpVariable_test: $(SRC_TEST)/RpVariable_test.cc
99        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
100
101RpUnitsC_test: $(SRC_TEST)/RpUnitsC_test.c
102        $(CC) $(DEBUG) $(INCL_CEE) $(INCL_CORE) -o $@ $^ $(LIB_RAPPTURE)
103
104RpUnitsF_test: $(SRC_TEST)/RpUnitsF_test.f
105        $(F77) $(DEBUG) -o $@ $^ $(LIB_RAPPTURE)
106
107
108#### CLEAN UP ############################################################
109clean:
110        - rm -f *.o $(TEST_PROGS)
Note: See TracBrowser for help on using the repository browser.