Commit 7c7468ff authored by Sebastian Hütter's avatar Sebastian Hütter
Browse files

Change c->cpp for better integration with makefile

parent bab292b5
Loading
Loading
Loading
Loading

src/USER-MEAMC/Install.sh

deleted100644 → 0
+0 −47
Original line number Diff line number Diff line
# Install/unInstall package files in LAMMPS
# mode = 0/1/2 for uninstall/install/update

# this is default Install.sh for all packages
# if package has an auxiliary library or a file with a dependency,
# then package dir has its own customized Install.sh

mode=$1

# enforce using portable C locale
LC_ALL=C
export LC_ALL

# arg1 = file, arg2 = file it depends on

action () {
  if (test $mode = 0) then
    rm -f ../$1
  elif (! cmp -s $1 ../$1) then
    if (test -z "$2" || test -e ../$2) then
      cp $1 ..
      if (test $mode = 2) then
        echo "  updating src/$1"
      fi
    fi
  elif (test -n "$2") then
    if (test ! -e ../$2) then
      rm -f ../$1
    fi
  fi
}

# all package files with no dependencies

for file in *.cpp *.h; do
  test -f ${file} && action $file
done


# additional files

for file in meam_*.c; do
  test -f ${file} && action ${file}
done

action fm_exp.c
action meam.h
+2 −0
Original line number Diff line number Diff line
extern "C" {
/*
   Copyright (c) 2012,2013   Axel Kohlmeyer <akohlmey@gmail.com>
   All rights reserved.
@@ -131,3 +132,4 @@ double fm_exp(double x)
 * indent-tabs-mode: nil
 * End:
 */
}
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ typedef struct {
      double dr,rdrar;
} meam_data_t;

meam_data_t meam_data;
extern meam_data_t meam_data;

// Functions we need for compat
#ifndef max
+2 −0
Original line number Diff line number Diff line
extern "C" {
#include "meam.h"

void meam_cleanup_(void) {
@@ -12,3 +13,4 @@ void meam_cleanup_(void) {
    deallocate(meam_data.phir);

}
}
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
extern "C" {
#include "meam.h"

meam_data_t meam_data = {};
}
 No newline at end of file
Loading