From 71185989660cb87a984f4e8834de1aa0ac5fd34c Mon Sep 17 00:00:00 2001 From: Andrew Jewett Date: Mon, 6 May 2019 17:11:16 -0700 Subject: [PATCH] updated compiler settings file. hopefully the same settings work on both mac and linux --- README.md | 16 ++++++++-------- src/Makefile | 2 +- src/{setup_gcc_linux_dbg.sh => setup_gcc.sh} | 6 +++--- src/{setup_gcc_linux.sh => setup_gcc_dbg.sh} | 5 +++-- src/setup_gcc_mac.sh | 15 --------------- src/setup_gcc_mac_dbg.sh | 16 ---------------- 6 files changed, 15 insertions(+), 45 deletions(-) rename src/{setup_gcc_linux_dbg.sh => setup_gcc.sh} (56%) mode change 100755 => 100644 rename src/{setup_gcc_linux.sh => setup_gcc_dbg.sh} (59%) mode change 100755 => 100644 delete mode 100755 src/setup_gcc_mac.sh delete mode 100755 src/setup_gcc_mac_dbg.sh diff --git a/README.md b/README.md index 694ebc3..dbc805a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)] + ndmansfield =========== @@ -53,6 +55,7 @@ This program was originally used to generate initial coordinates for polymer mel ![coarse grained DNA polymer model](./doc/images/moltemplate_usage/CG_dsDNA_gold_turquoise.gif) ![coarse grained DNA polymer model](./doc/images/rightarrow.png) ![DNA wrapped around a curve. Color varies from blue to red.](./doc/images/moltemplate_usage/wrap_CG_dsDNA_around_a_curve_from_ndmansfield_LLR.png) ## Running Time + The total running time necessary to generate a random curve is estimated to be O(n^2). (The number of iterations necessary to generate a random curve was estimated @@ -63,13 +66,15 @@ and were generated in a few minutes. ## Compilation -## Linux: +## Linux and Apple macOS: cd src - source setup_gcc_linux.sh + source setup_gcc.sh make -(If you are not using the bash shell, enter "bash" into the terminal beforehand) +(If you are not using the bash shell, enter "bash" into the terminal beforehand. + *Note: Apple users* will need to install the gcc compiler + and other build tools using Xcode or brew.) ## Windows 10: @@ -80,11 +85,6 @@ Install the Windows Subsystem for Linux (WSL) and run and then follow the instructions above for linux. (Older windows users can install Cygwin or MinGW.) -## Apple: - - cd src - source setup_gcc_OSX.sh - make ## Dimensionality: diff --git a/src/Makefile b/src/Makefile index cce2219..64ac1c9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -58,7 +58,7 @@ ndmansfield: $(OBJECT_FILES) $(LIB_FILES) $(LIBS) -GENERATED_FILES = *.o *.a *.pure core ndmansfield +GENERATED_FILES = *.o *.a core ndmansfield install: $(MAKE) ANSI_C="$(ANSI_C)" ANSI_CPP="$(ANSI_CPP)" L_COMP="$(L_COMP)" CFLAGS="$(CFLAGS)" LFLAGS="$(LFLAGS)" INSTALL_PATH="$(INSTALL_PATH)" ndmansfield diff --git a/src/setup_gcc_linux_dbg.sh b/src/setup_gcc.sh old mode 100755 new mode 100644 similarity index 56% rename from src/setup_gcc_linux_dbg.sh rename to src/setup_gcc.sh index c996d1e..ffed8a8 --- a/src/setup_gcc_linux_dbg.sh +++ b/src/setup_gcc.sh @@ -4,11 +4,11 @@ export ANSI_C="gcc" export ANSI_CPP="g++" export L_COMP="ar rs" -export LFLAGS="-static" +export LFLAGS="" +#export LFLAGS="-static" <- using "-static" linker flag causes trouble with macs -export MY_FLAGS="-std=c++11 -g -O0" +export MY_FLAGS="-std=c++11 -O3 -DNDEBUG -ffast-math" export CFLAGS="-c $MY_FLAGS" export CPP_PRELINKER_COMMAND="echo" export COMPILER_TEMP_FILES="" export LINKER_TEMP_FILES="" - diff --git a/src/setup_gcc_linux.sh b/src/setup_gcc_dbg.sh old mode 100755 new mode 100644 similarity index 59% rename from src/setup_gcc_linux.sh rename to src/setup_gcc_dbg.sh index f91e15c..f5ac1b1 --- a/src/setup_gcc_linux.sh +++ b/src/setup_gcc_dbg.sh @@ -4,9 +4,10 @@ export ANSI_C="gcc" export ANSI_CPP="g++" export L_COMP="ar rs" -export LFLAGS="-static" +export LFLAGS="" +#export LFLAGS="-static" <- using "-static" linker flag causes trouble with macs -export MY_FLAGS="-std=c++11 -O3 -DNDEBUG -ffast-math -finline-functions" +export MY_FLAGS="-std=c++11 -g3 -O0" export CFLAGS="-c $MY_FLAGS" export CPP_PRELINKER_COMMAND="echo" export COMPILER_TEMP_FILES="" diff --git a/src/setup_gcc_mac.sh b/src/setup_gcc_mac.sh deleted file mode 100755 index 2963710..0000000 --- a/src/setup_gcc_mac.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -export ANSI_C="gcc" -export ANSI_CPP="g++" -export L_COMP="ar rs" - -export LFLAGS="" -# Note: Static linking where avaiable is recommended. If you're using linux use: -# export LFLAGS="-static" - -export MY_FLAGS="-std=c++11 -O3 -DNDEBUG -ffast-math -finline-functions -DSTRTOLD_UNSUPPORTED" -export CFLAGS="-c $MY_FLAGS" -export CPP_PRELINKER_COMMAND="echo" -export COMPILER_TEMP_FILES="" -export LINKER_TEMP_FILES="" diff --git a/src/setup_gcc_mac_dbg.sh b/src/setup_gcc_mac_dbg.sh deleted file mode 100755 index b058cab..0000000 --- a/src/setup_gcc_mac_dbg.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -export ANSI_C="gcc" -export ANSI_CPP="g++" -export L_COMP="ar rs" - -export LFLAGS="" -# Note: Static linking where avaiable is recommended. If you're using linux use: -# export LFLAGS="-static" - -export MY_FLAGS="-std=c++11 -g -O0 -DSTRTOLD_UNSUPPRTED" -export CFLAGS="-c $MY_FLAGS" -export CPP_PRELINKER_COMMAND="echo" -export COMPILER_TEMP_FILES="" -export LINKER_TEMP_FILES="" -