source: trunk/test/Makefile @ 84

Last change on this file since 84 was 84, checked in by dkearney, 19 years ago
  1. added "install" target to make file for copying files over to /opt/rappture
  2. added targets for python to build and install the units module
  3. added fortran stub functions for library and units.

RpLibraryF_test.f compiles, just with warnings, because i'm still working on it.

File size: 3.0 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                  RpLibraryF_test
29
30# define our compiling environment
31#
32CC              = gcc
33CXX             = g++
34DEBUG           = -g -Wall
35DEBUG_PLUS      = -g -DDEBUG
36
37PY              = python
38
39F77             = g77
40
41LN              = ln
42
43# define our directories
44#
45INCLUDES_DIR    = $(RP_BASE)/include
46BIN_DIR         = $(RP_BASE)/bin
47LIB_DIR         = $(RP_BASE)/src
48SRC_DIR         = $(RP_BASE)/src
49TEST_DIR        = $(RP_BASE)/test
50
51LIB_INC_PREFIX  = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR)
52
53LIB_RP_OBJECTS  = $(LIB_INC_PREFIX) -lRpObjects
54LIB_RAPPTURE    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
55
56INCL_CORE       = -I $(INCLUDES_DIR)/core
57INCL_CEE        = -I $(INCLUDES_DIR)/cee
58INCL_FORTRAN    = -I $(INCLUDES_DIR)/fortran
59INCL_PY         = -I $(INCLUDES_DIR)/python
60
61
62default: $(TEST_PROGS)
63all: $(TEST_PROGS)
64test: $(TEST_PROGS)
65
66# include test programs
67
68SRC_TEST            = $(TEST_DIR)/src
69
70
71RpBoolean_test: $(SRC_TEST)/RpBoolean_test.cc
72        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
73   
74RpChoice_test: $(SRC_TEST)/RpChoice_test.cc
75        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
76   
77RpNumber_test: $(SRC_TEST)/RpNumber_test.cc
78        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
79
80RpString_test: $(SRC_TEST)/RpString_test.cc
81        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
82
83RpUnits_test: $(SRC_TEST)/RpUnits_test.cc
84        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RAPPTURE)
85
86RpVariable_test: $(SRC_TEST)/RpVariable_test.cc
87        $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS)
88
89RpUnitsC_test: $(SRC_TEST)/RpUnitsC_test.c
90        $(CC) $(DEBUG) $(INCL_CEE) $(INCL_CORE) -o $@ $^ $(LIB_RAPPTURE)
91
92RpLibrary_test: $(SRC_TEST)/RpLibrary_test.cc
93        $(CXX) $(DEBUG) $(INCL_CEE) $(INCL_CORE) $(LIB_SCEW_INCL) -o $@ $^ $(LIB_RAPPTURE)
94
95RpLibraryC_test: $(SRC_TEST)/RpLibraryC_test.c
96        $(CC) $(DEBUG) $(INCL_CEE) $(INCL_CORE) $(LIB_SCEW_INCL) -o $@ $^ $(LIB_RAPPTURE)
97
98RpLibraryF_test: $(SRC_TEST)/RpLibraryF_test.f
99        $(F77) $(DEBUG) -o $@ $^ $(LIB_RAPPTURE)
100
101RpUnitsF_test: $(SRC_TEST)/RpUnitsF_test.f
102        $(F77) $(DEBUG) -o $@ $^ $(LIB_RAPPTURE)
103
104
105#### CLEAN UP ############################################################
106clean:
107        - rm -f *.o $(TEST_PROGS) run*.xml
Note: See TracBrowser for help on using the repository browser.