-
Notifications
You must be signed in to change notification settings - Fork 298
/
Makefile
146 lines (135 loc) · 3.53 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
TEST = ../../rtest -v
TESTFILES = \
tearnonlin1.mos \
WhenInitialTerminal.mos \
WhenStatement1.mos \
WhenTuple.mos \
BouncingBall.mos \
arrayCatTest.mos \
arrayOperationsTest.mos \
arraySliceTest.mos \
clockedAlgloopTest.mos \
clockedEventTest.mos \
clockedSolverTest.mos \
clockedTypesTest.mos \
clockedTest.mos \
externalArrayInputTest.mos \
externalRecordTest.mos \
mathFunctionsTest.mos \
mslDistributionsTest.mos \
mslElectricalMachinesTest.mos \
mslElectricalMachinesTestDAE.mos \
mslElectricalSensorsTest.mos \
mslMathFFT1Test.mos \
nameClashTest.mos \
functionPointerTest.mos \
recordTupleReturnTest.mos \
RefArrayDim2.mos \
solveTest.mos \
solveOneNonlinearEquationTest.mos \
testArrayEquations.mos \
testDAE.mos \
testMatrixIO.mos \
testMatrixState.mos \
testRecordStartValue.mos \
testReduction.mos \
testVectorizedBlocks.mos \
testVectorizedSolarSystem.mos \
trapezoidTest.mos \
negatedParameter.mos
FAILINGTESTFILES= \
clockedEventRotationalTest.mos \
ClockInterval.mos \
testVectorizedPowerSystem.mos \
# Dependency files that are not .mo .mos or Makefile
# Add them here or they will be cleaned.
DEPENDENCIES = \
*.mo \
*.mos \
FlatParse.mof \
Makefile \
EventTests.mat \
ExtObj.c \
ExtObj.h \
ExtObjStringParam.ext.c \
ExtObjStringParam.ext.h \
ExternalFunc1.c \
ExternalFunc1_ext.h \
ExternalFunc2.c \
ExternalFunc2.h \
Func.c \
Func.h \
InOutStrings_fkn1.cc \
InOutStrings_fkn2.cc \
ModelicaUtilities.myExtFunction.c \
dependencies.dep \
testTables.txt \
testTables2.csv \
testTables2.txt \
testTables2D.txt \
hpcom \
fmu \
staticLinking \
genDebugSymbols \
hardcodedStartValues \
outputFormat \
ReferenceFiles \
outputFormat \
libraries \
peer \
omedit
CLEAN = `ls | grep -w -v -f deps.tmp`
HPCOM_DIR = hpcom/
HPCOM_FMI_1_0_DIR = hpcom/fmu/modelExchange/1.0
FMI_1_0_DIR = fmu/modelExchange/1.0
FMI_2_0_DIR = fmu/modelExchange/2.0
STATIC_LINKING_DIR = staticLinking
DEBUG_SYMBOLS_DIR = genDebugSymbols
HARDCODED_START_VALUES_DIR = hardcodedStartValues
OUTPUT_FORMAT_DIR = outputFormat
OMEDIT_DIR = omedit
.PHONY : test clean getdeps failingtest
test:
@echo
@echo Running tests...
@echo
@echo OPENMODELICAHOME=" $(OPENMODELICAHOME) "
@$(TEST) $(TESTFILES)
@$(MAKE) -C $(HPCOM_DIR)
@$(MAKE) -C $(FMI_1_0_DIR)
@$(MAKE) -C $(FMI_2_0_DIR)
@$(MAKE) -C $(HPCOM_FMI_1_0_DIR)
@$(MAKE) -C $(STATIC_LINKING_DIR)
@$(MAKE) -C $(DEBUG_SYMBOLS_DIR)
@$(MAKE) -C $(HARDCODED_START_VALUES_DIR)
@$(MAKE) -C $(OUTPUT_FORMAT_DIR)
@$(MAKE) -C $(OMEDIT_DIR)
# Cleans all files that are not listed as dependencies
clean :
@echo $(DEPENDENCIES) | sed 's/ /\\|/g' > deps.tmp
@rm -f $(CLEAN)
@$(MAKE) -C $(HPCOM_DIR) clean
@$(MAKE) -C $(FMI_1_0_DIR) clean
@$(MAKE) -C $(FMI_2_0_DIR) clean
@$(MAKE) -C $(HPCOM_FMI_1_0_DIR) clean
@$(MAKE) -C $(STATIC_LINKING_DIR) clean
@$(MAKE) -C $(DEBUG_SYMBOLS_DIR) clean
@$(MAKE) -C $(HARDCODED_START_VALUES_DIR) clean
@$(MAKE) -C $(OUTPUT_FORMAT_DIR) clean
@$(MAKE) -C $(OMEDIT_DIR) clean
# Run this if you want to list out the files (dependencies).
# do it after cleaning and updating the folder
# then you can get a list of file names (which must be dependencies
# since you got them from repository + your own new files)
# then add them to the DEPENDENCIES. You can find the
# list in deps.txt
getdeps:
@echo $(DEPENDENCIES) | sed 's/ /\\|/g' > deps.tmp
@echo $(CLEAN) | sed -r 's/deps.txt|deps.tmp//g' | sed 's/ / \\\n/g' > deps.txt
@echo Dependency list saved in deps.txt.
@echo Copy the list from deps.txt and add it to the Makefile @DEPENDENCIES
failingtest :
@echo
@echo Running failing tests...
@echo
@$(TEST) $(FAILINGTESTFILES)