mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
changes reqd to compile on linux
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/branches/class@4150 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
a233c4a431
commit
adb8c93366
1570
GNUmakefile
1570
GNUmakefile
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
#define _INC_IPHREEQC_H
|
||||
|
||||
#include "IPhreeqcCallbacks.h" /* PFN_PRERUN_CALLBACK, PFN_POSTRUN_CALLBACK, PFN_CATCH_CALLBACK */
|
||||
#include "CVar.hxx" /* VRESULT */
|
||||
#include "Var.h" /* VRESULT */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
||||
@ -73,7 +73,7 @@ f2cstring(char* fstring, int len)
|
||||
}
|
||||
|
||||
void
|
||||
padfstring(char *dest, char *src, unsigned int len)
|
||||
padfstring(char *dest, const char *src, unsigned int len)
|
||||
{
|
||||
unsigned int sofar;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
#include <string.h> /* strlen */
|
||||
|
||||
extern char *f2cstring(char* fstring, int len);
|
||||
extern void padfstring(char *dest, char *src, unsigned int len);
|
||||
extern void padfstring(char *dest, const char *src, unsigned int len);
|
||||
|
||||
#define fullpathpp fullpathpp_
|
||||
#define splitpathpp splitpathpp_
|
||||
@ -63,8 +63,8 @@ splitpathpp(char *path, char* drive, char* dir, char* name, char* ext,
|
||||
unsigned int ext_len)
|
||||
{
|
||||
int i;
|
||||
int dot = 0;
|
||||
int slash = 0;
|
||||
size_t dot = 0;
|
||||
size_t slash = 0;
|
||||
int slash_found = 0;
|
||||
char *cpath = NULL;
|
||||
size_t plen = 0;
|
||||
@ -72,7 +72,7 @@ splitpathpp(char *path, char* drive, char* dir, char* name, char* ext,
|
||||
/* linux has no drives */
|
||||
padfstring(drive, "", drive_len);
|
||||
|
||||
if (cpath = f2cstring(path, path_len)) {
|
||||
if ((cpath = f2cstring(path, path_len))) {
|
||||
plen = strlen(cpath);
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
CPPUNIT = /z/parkplace/home/charlton
|
||||
CC = g++
|
||||
DEFINES = -DNDEBUG -DSWIG_SHARED_OBJ -DPHREEQC_CPP -DPHREEQC_CLASS -DUSE_PHRQ_ALLOC
|
||||
CFLAGS = -Wall -O3
|
||||
CPPFLAGS = -DSWIG_SHARED_OBJ -I$(CPPUNIT)/include -I../include -I../src/phreeqcpp -I../src/phreeqcpp/phreeqc
|
||||
CPPFLAGS = $(DEFINES) -I$(CPPUNIT)/include -I../include -I../src -I../src/phreeqcpp -I../src/phreeqcpp/phreeqc
|
||||
TARGET_ARCH =
|
||||
FC = f95
|
||||
FFLAGS = -fno-second-underscore
|
||||
@ -13,7 +14,7 @@ AR = ar ruv
|
||||
TARGET = unit
|
||||
LDFLAGS = -L../lib -L$(CPPUNIT)/lib -ldl
|
||||
|
||||
VPATH=.:../src:../src/phreeqcpp/phreeqc
|
||||
VPATH=.:../src:../src/phreeqcpp:../src/phreeqcpp/phreeqc
|
||||
|
||||
%.o: %.f
|
||||
$(FC) $(FFLAGS) $(TARGET_ARCH) -c -o $@ $<
|
||||
@ -45,10 +46,41 @@ SOBJS = \
|
||||
SelectedOutput.o \
|
||||
Var.o \
|
||||
fwrap.o \
|
||||
global.o \
|
||||
module_files.o \
|
||||
module_output.o
|
||||
|
||||
|
||||
PPOBJS = \
|
||||
cxxKinetics.cxx \
|
||||
cxxMix.cxx \
|
||||
dumper.cpp \
|
||||
Exchange.cxx \
|
||||
ExchComp.cxx \
|
||||
GasPhase.cxx \
|
||||
ISolutionComp.cxx \
|
||||
ISolution.cxx \
|
||||
KineticsComp.cxx \
|
||||
NameDouble.cxx \
|
||||
NumKeyword.cxx \
|
||||
Parser.cxx \
|
||||
Phreeqc.cpp \
|
||||
PPassemblageComp.cxx \
|
||||
PPassemblage.cxx \
|
||||
Reaction.cxx \
|
||||
ReadClass.cxx \
|
||||
runner.cpp \
|
||||
Solution.cxx \
|
||||
SolutionIsotope.cxx \
|
||||
SolutionIsotopeList.cxx \
|
||||
SSassemblage.cxx \
|
||||
SSassemblageSS.cxx \
|
||||
StorageBin.cxx \
|
||||
StorageBinList.cpp \
|
||||
SurfaceCharge.cxx \
|
||||
SurfaceComp.cxx \
|
||||
Surface.cxx \
|
||||
System.cxx \
|
||||
Temperature.cxx \
|
||||
Utils.cxx
|
||||
|
||||
POBJS = \
|
||||
advection.o \
|
||||
@ -90,7 +122,7 @@ POBJS = \
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(TOBJS) $(POBJS) $(SOBJS)
|
||||
$(TARGET): $(TOBJS) $(POBJS) $(PPOBJS) $(SOBJS)
|
||||
$(CXX) $(LDFLAGS) -o unit $(TOBJS) $(POBJS) $(SOBJS) -lcppunit
|
||||
|
||||
clean:
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
#if defined(_WIN32) || defined(__CYGWIN32__)
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <stdio.h>
|
||||
int DeleteFile(const char* szPathName)
|
||||
{
|
||||
if (remove(szPathName) == 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user