Introduce generic variant targets

Change Makefiles to allow multiple binary targets specified by VARIANT
environment variabel. For specified variants a matching main-<VARIANT>.c
source file must be present.
This commit is contained in:
Jan Eitzinger
2021-04-12 08:24:27 +02:00
parent 77a0774208
commit 35273c491b
10 changed files with 15 additions and 25 deletions

View File

@@ -39,9 +39,9 @@ void init(Parameter *param) {
}
// Show debug messages
//#define DEBUG printf
//#define DEBUG(msg) printf(msg)
// Do not show debug messages
#define DEBUG
#define DEBUG(msg)
#define ADD_ATOM(x, y, z, vx, vy, vz) atom_x(atom->Nlocal) = base_x + x * NEIGH_DISTANCE; \
atom_y(atom->Nlocal) = base_y + y * NEIGH_DISTANCE; \
@@ -49,7 +49,7 @@ void init(Parameter *param) {
atom->vx[atom->Nlocal] = vy; \
atom->vy[atom->Nlocal] = vy; \
atom->vz[atom->Nlocal] = vz; \
atom->Nlocal++
atom->Nlocal++
int main(int argc, const char *argv[]) {
Atom atom_data;