Skip to content

Commit

Permalink
Add makefile stub for "turso"
Browse files Browse the repository at this point in the history
  • Loading branch information
KariRummukainen committed Dec 20, 2023
1 parent e898a3f commit 39bfde7
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions libraries/target_arch/turso.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Platform specific makefile for turso mpi code
# Turso does not have clang, so we use statically compiled hilapp
#
# this is included from main.mk -file, which is in turn included from
# application makefile
#


$(info ########################################################################)
$(info Target turso: remember to )
$(info module load fftw )
$(info ########################################################################)


### Define compiler and options

# Define compiler
CC := mpic++
LD := mpic++

# Define compilation flags
CXXFLAGS := -O3 -x c++ --std=c++17
#CXXFLAGS := -g -x c++ --std=c++17

# hilapp needs to know where c++ system include files are located. This is not a problem if
# hilapp was built from system installed clang, but if hilapp was statically compiled elsewhere
# and copied here it must be told. Instead of hunting the directories by hand, we can ask
# system installed compilers. g++ should be present almost everywhere. The strange incantation
# below makes g++ list the search directories. The result is written to build/0hilapp_incl_dirs

HILAPP_INCLUDE_LIST := $(addprefix -I, $(shell echo | g++ -xc++ --std=c++17 -Wp,-v - 2>&1 | grep "^ "))

# Write hilapp includes to a file 0hilapp_incl_dirs
$(shell mkdir -p build; echo "$(HILAPP_INCLUDE_LIST)" > build/0hilapp_incl_dirs )
HILAPP_INCLUDES := `cat build/0hilapp_incl_dirs`


# Linker libraries and possible options

LDLIBS = -lfftw3 -lm
LDFLAGS =

# These variables must be defined here
#
HILAPP_OPTS = $(HILAPP_INCLUDES)
HILA_OPTS =



0 comments on commit 39bfde7

Please sign in to comment.