Skip to content

Commit d3a66dc

Browse files
committed
- fixes to Makefiles to compile *.o when *.c* change
- made simulation_input.cpp read the <<tolerance>> from the Model_init.txt git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@2951 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent cbf2166 commit d3a66dc

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

c_runtime/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ g++ -c -o sendData/libsendData.o sendData/humbug.cpp && \
4444
ar -ru sendData/release/libsendData.a sendData/libsendData.o
4545
endif
4646

47-
all : libc_runtime.a libsim.a libf2c.a libsendData.a install
47+
all : $(SIMOBJS) $(OBJS) libc_runtime.a libsim.a libf2c.a libsendData.a install
48+
49+
$(SIMOBJS) : $(HFILES) *.c*
50+
$(OBJS) : $(HFILES) *.c*
4851

4952
libc_runtime.a : $(OBJS)
5053
$(AR) $@ $(OBJS)

c_runtime/simulation_input.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,21 @@ void read_commented_value(ifstream &f, char **str);
7878
}
7979
// cerr << "opened file" << endl;
8080
read_commented_value(file,start);
81+
if (sim_verbose) { cout << "read start = " << *start << " from init file." << endl; }
8182
read_commented_value(file,stop);
83+
if (sim_verbose) { cout << "read stop = " << *stop << " from init file." << endl; }
8284
read_commented_value(file,stepSize);
83-
85+
if (sim_verbose) { cout << "read stepSize = " << *stepSize << " from init file." << endl; }
8486
if (stepSize < 0) { // stepSize < 0 => Automatic number of outputs
8587
*outputSteps = -1;
8688
} else {
8789
// Calculate outputSteps from stepSize, start and stop
88-
*outputSteps = (long)(int(*stop-*start) /(*stepSize));
90+
*outputSteps = (long)(int(*stop-*start) /(*stepSize));
8991
}
92+
read_commented_value(file,tolerance);
93+
if (sim_verbose) { cout << "read tolerance = " << *tolerance << " from init file." << endl; }
9094
read_commented_value(file,method);
95+
if (sim_verbose) { cout << "read method = " << *method << " from init file." << endl; }
9196
int nxchk,nychk,npchk;
9297
int nystrchk,npstrchk;
9398
read_commented_value(file,&nxchk);

0 commit comments

Comments
 (0)