1 | # you need to change this to where your version of python is installed. |
---|
2 | # tell make where to find python header files |
---|
3 | RP_INSTALL_BASE = @prefix@ |
---|
4 | |
---|
5 | # tell make where to find the rappture dependency include files |
---|
6 | INCL_RP_DEPS = -I $(RP_INSTALL_BASE)/include |
---|
7 | |
---|
8 | # define the top of the rappture directory structure |
---|
9 | RP_BASE = @RP_BASE@ |
---|
10 | |
---|
11 | # define which programs can be made |
---|
12 | |
---|
13 | TEST_PROGS = RpBoolean_test \ |
---|
14 | RpChoice_test \ |
---|
15 | RpNumber_test \ |
---|
16 | RpString_test \ |
---|
17 | RpUnits_test \ |
---|
18 | RpVariable_test \ |
---|
19 | RpUnitsC_test \ |
---|
20 | RpUnitsF_test \ |
---|
21 | RpLibrary_test \ |
---|
22 | RpLibraryC_test \ |
---|
23 | RpLibraryF_test |
---|
24 | |
---|
25 | # define our compiling environment |
---|
26 | # |
---|
27 | CC = @CC@ |
---|
28 | CXX = @CXX@ |
---|
29 | DEBUG = -g -Wall |
---|
30 | DEBUG_PLUS = -g -DDEBUG |
---|
31 | |
---|
32 | PY = python |
---|
33 | |
---|
34 | F77 = @F77@ |
---|
35 | |
---|
36 | LN = ln |
---|
37 | |
---|
38 | # define our directories |
---|
39 | # |
---|
40 | INCLUDES_DIR = $(RP_BASE)/src |
---|
41 | BIN_DIR = $(RP_BASE)/bin |
---|
42 | LIB_DIR = $(RP_INSTALL_BASE)/lib # $(RP_BASE)/src |
---|
43 | SRC_DIR = $(RP_BASE)/src |
---|
44 | TEST_DIR = $(RP_BASE)/test |
---|
45 | |
---|
46 | LIB_INC_PREFIX = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) |
---|
47 | |
---|
48 | LIB_RP_OBJECTS = $(LIB_INC_PREFIX) -lRpObjects |
---|
49 | LIB_RAPPTURE = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture |
---|
50 | |
---|
51 | INCL_CORE = -I $(INCLUDES_DIR)/core |
---|
52 | INCL_CEE = -I $(INCLUDES_DIR)/cee |
---|
53 | INCL_FORTRAN = -I $(INCLUDES_DIR)/fortran |
---|
54 | |
---|
55 | |
---|
56 | default: $(TEST_PROGS) |
---|
57 | all: $(TEST_PROGS) |
---|
58 | test: $(TEST_PROGS) |
---|
59 | |
---|
60 | # include test programs |
---|
61 | |
---|
62 | SRC_TEST = $(TEST_DIR)/src |
---|
63 | |
---|
64 | |
---|
65 | RpBoolean_test: $(SRC_TEST)/RpBoolean_test.cc |
---|
66 | $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS) |
---|
67 | |
---|
68 | RpChoice_test: $(SRC_TEST)/RpChoice_test.cc |
---|
69 | $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS) |
---|
70 | |
---|
71 | RpNumber_test: $(SRC_TEST)/RpNumber_test.cc |
---|
72 | $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS) |
---|
73 | |
---|
74 | RpString_test: $(SRC_TEST)/RpString_test.cc |
---|
75 | $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS) |
---|
76 | |
---|
77 | RpUnits_test: $(SRC_TEST)/RpUnits_test.cc |
---|
78 | $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RAPPTURE) |
---|
79 | |
---|
80 | RpVariable_test: $(SRC_TEST)/RpVariable_test.cc |
---|
81 | $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS) |
---|
82 | |
---|
83 | RpUnitsC_test: $(SRC_TEST)/RpUnitsC_test.c |
---|
84 | $(CC) $(DEBUG) $(INCL_CEE) $(INCL_CORE) -o $@ $^ $(LIB_RAPPTURE) |
---|
85 | |
---|
86 | RpLibrary_test: $(SRC_TEST)/RpLibrary_test.cc |
---|
87 | $(CXX) $(DEBUG) $(INCL_CEE) $(INCL_CORE) $(INCL_RP_DEPS) -o $@ $^ $(LIB_RAPPTURE) |
---|
88 | |
---|
89 | RpLibraryC_test: $(SRC_TEST)/RpLibraryC_test.c |
---|
90 | $(CC) $(DEBUG) $(INCL_CEE) $(INCL_CORE) $(INCL_RP_DEPS) -o $@ $^ $(LIB_RAPPTURE) |
---|
91 | |
---|
92 | RpLibraryF_test: $(SRC_TEST)/RpLibraryF_test.f |
---|
93 | $(F77) $(DEBUG) -o $@ $^ $(LIB_RAPPTURE) |
---|
94 | |
---|
95 | RpUnitsF_test: $(SRC_TEST)/RpUnitsF_test.f |
---|
96 | $(F77) $(DEBUG) -o $@ $^ $(LIB_RAPPTURE) |
---|
97 | |
---|
98 | RpValue_test: $(SRC_TEST)/RpValue_test.cc |
---|
99 | $(CXX) $(DEBUG) $(INCL_CORE) -o $@ $< $(LIB_RP_OBJECTS) |
---|
100 | |
---|
101 | RpFortranDocExamples: $(SRC_TEST)/RpFortranDocExamples.f |
---|
102 | $(F77) $(DEBUG) -o $@ $^ $(LIB_RAPPTURE) |
---|
103 | |
---|
104 | |
---|
105 | #### CLEAN UP ############################################################ |
---|
106 | clean: |
---|
107 | - rm -f *.o $(TEST_PROGS) run*.xml |
---|
108 | |
---|
109 | distclean: clean |
---|
110 | - rm Makefile |
---|