From 1f1598dec9f4e4cb0178592b97b23f53914ee0e2 Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Mon, 13 Jan 2020 09:49:42 -0500 Subject: [PATCH] Added Make install and fix to main --- src/Makefile | 4 ++++ src/main.f90 | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/Makefile b/src/Makefile index acc2066..c20e5b2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -29,6 +29,10 @@ cleantest: test: testfuncs ./testfuncs +.PHONY: install +install: cacmb + cp ./cacmb /usr/local/bin + $(OBJECTS) : parameters.o atoms.o subroutines.o testfuncs.o box.o : functions.o main.o io.o $(MODES) $(OPTIONS) : elements.o diff --git a/src/main.f90 b/src/main.f90 index 6bdc0ed..49b1a36 100644 --- a/src/main.f90 +++ b/src/main.f90 @@ -23,6 +23,7 @@ program main !Call initialization functions call lattice_init call box_init + end_mode_arg = 0 ! Command line parsing arg_num = command_argument_count() @@ -36,6 +37,10 @@ program main call call_mode(end_mode_arg, argument) end if + !Check to make sure a mode was called + if (end_mode_arg=0) then + stop "Please run cacmb using an available mode" + end if !Now we loop through all of the arguments and check for passed options or for a filename to be written out arg_pos = end_mode_arg do while(.true.)