Skip to content

Commit

Permalink
clean up makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
eddy16112 committed Oct 5, 2018
1 parent feca596 commit def6146
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 47 deletions.
19 changes: 2 additions & 17 deletions runtime/runtime.mk
Original file line number Diff line number Diff line change
Expand Up @@ -632,12 +632,6 @@ GEN_GPU_OBJS :=
GPU_RUNTIME_OBJS:=
endif

ifeq ($(strip $(FORTRAN_LEAF_TASK)),1)
GEN_FORTRAN_OBJS := $(GEN_FORTRAN_SRC:.f90=.o)
LD_FLAGS += -lgfortran
F90 := gfortran
endif

ifeq ($(strip $(LEGION_WITH_FORTRAN)),1)
GEN_FORTRAN_OBJS := $(GEN_FORTRAN_SRC:.f90=.o)
LD_FLAGS += -lgfortran
Expand All @@ -657,11 +651,7 @@ all: $(OUTFILE)
endif

# If we're using CUDA we have to link with nvcc
ifeq ($(strip $(FORTRAN_LEAF_TASK)),1)
$(OUTFILE) : $(SLIB_LEGION) $(SLIB_REALM) $(GEN_OBJS) $(GEN_FORTRAN_OBJS) $(GEN_GPU_OBJS)
@echo "---> Linking objects into one binary: $(OUTFILE)"
$(CXX) -o $(OUTFILE) $(GEN_OBJS) $(GEN_FORTRAN_OBJS) $(GEN_GPU_OBJS) $(LD_FLAGS) $(LEGION_LIBS) $(LEGION_LD_FLAGS) $(GASNET_FLAGS)
else ifeq ($(strip $(LEGION_WITH_C)),1)
ifeq ($(strip $(LEGION_WITH_C)),1)
$(OUTFILE) : $(GEN_OBJS) $(GEN_C_OBJS) $(GEN_GPU_OBJS) $(SLIB_LEGION) $(SLIB_REALM)
@echo "---> Linking objects into one binary: $(OUTFILE)"
$(CXX) -o $(OUTFILE) $(GEN_OBJS) $(GEN_C_OBJS) $(GEN_GPU_OBJS) $(LD_FLAGS) $(LEGION_LIBS) $(LEGION_LD_FLAGS) $(GASNET_FLAGS)
Expand Down Expand Up @@ -705,12 +695,7 @@ $(GPU_RUNTIME_OBJS): %.cu.o : %.cu
$(NVCC) -o $@ -c $< $(NVCC_FLAGS) $(INC_FLAGS)

$(LEGION_FORTRAN_API_OBJS) : %.o : %.f90
gfortran -cpp -J$(LG_RT_DIR) -o $@ -c $< $(FC_FLAGS) $(INC_FLAGS)

ifeq ($(strip $(FORTRAN_LEAF_TASK)),1)
$(GEN_FORTRAN_OBJS) : %.o : %.f90
$(F90) -cpp -o $@ -c $< $(CC_FLAGS) $(INC_FLAGS)
endif
$(F90) -cpp -J$(LG_RT_DIR) -o $@ -c $< $(FC_FLAGS) $(INC_FLAGS)

ifeq ($(strip $(LEGION_WITH_FORTRAN)),1)
$(GEN_FORTRAN_OBJS) : %.o : %.f90
Expand Down
2 changes: 1 addition & 1 deletion tutorial-fortran/c_with_fortran/00_hello_world/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ CC_FLAGS ?=
NVCC_FLAGS ?=
GASNET_FLAGS ?=
LD_FLAGS ?=
FORTRAN_LEAF_TASK ?= 1
LEGION_WITH_FORTRAN ?= 1

###########################################################################
#
Expand Down
3 changes: 1 addition & 2 deletions tutorial-fortran/c_with_fortran/06_privileges/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ CC_FLAGS ?=
NVCC_FLAGS ?=
GASNET_FLAGS ?=
LD_FLAGS ?=
FORTRAN_LEAF_TASK ?= 1
LEGION_WITH_FORTRAN ?= 1

CC_FLAGS += -std=c++11
###########################################################################
#
# Don't change anything below here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ CC_FLAGS ?=
NVCC_FLAGS ?=
GASNET_FLAGS ?=
LD_FLAGS ?=
FORTRAN_LEAF_TASK ?= 1
# For Point and Rect typedefs
CC_FLAGS += -std=c++11
LEGION_WITH_FORTRAN ?= 1

###########################################################################
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ CC_FLAGS ?=
NVCC_FLAGS ?=
GASNET_FLAGS ?=
LD_FLAGS ?=
FORTRAN_LEAF_TASK ?= 1
# For Point and Rect typedefs
CC_FLAGS += -std=c++11
LEGION_WITH_FORTRAN ?= 1

###########################################################################
#
Expand Down
4 changes: 1 addition & 3 deletions tutorial-fortran/fortran/00_hello_world/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ALT_MAPPERS ?= 0 # Include alternative mappers (not recommended)
# Put the binary file name here
OUTFILE ?= hello_world
# List all the application source files here
GEN_FORTRAN_SRC ?= hello_world.f90 # .c files
GEN_FORTRAN_SRC ?= hello_world.f90 # .f90 files
GEN_GPU_SRC ?= # .cu files

# You can modify these variables, some will be appended to by the runtime makefile
Expand All @@ -39,8 +39,6 @@ NVCC_FLAGS ?=
GASNET_FLAGS ?=
LD_FLAGS ?=
LEGION_WITH_FORTRAN ?= 1
# For Point and Rect typedefs
CC_FLAGS += -std=c++11
###########################################################################
#
# Don't change anything below here
Expand Down
4 changes: 1 addition & 3 deletions tutorial-fortran/fortran/02_index_tasks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ALT_MAPPERS ?= 0 # Include alternative mappers (not recommended)
# Put the binary file name here
OUTFILE ?= index_tasks
# List all the application source files here
GEN_FORTRAN_SRC ?= index_tasks.f90 # .c files
GEN_FORTRAN_SRC ?= index_tasks.f90 # .f90 files
GEN_GPU_SRC ?= # .cu files

# You can modify these variables, some will be appended to by the runtime makefile
Expand All @@ -39,8 +39,6 @@ NVCC_FLAGS ?=
GASNET_FLAGS ?=
LD_FLAGS ?=
LEGION_WITH_FORTRAN ?= 1
# For Point and Rect typedefs
CC_FLAGS += -std=c++11
###########################################################################
#
# Don't change anything below here
Expand Down
4 changes: 1 addition & 3 deletions tutorial-fortran/fortran/06_privileges_2d_accessor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ALT_MAPPERS ?= 0 # Include alternative mappers (not recommended)
# Put the binary file name here
OUTFILE ?= privileges
# List all the application source files here
GEN_FORTRAN_SRC ?= privileges.f90 # .c files
GEN_FORTRAN_SRC ?= privileges.f90 # .f90 files
GEN_GPU_SRC ?= # .cu files

# You can modify these variables, some will be appended to by the runtime makefile
Expand All @@ -39,8 +39,6 @@ NVCC_FLAGS ?=
GASNET_FLAGS ?=
LD_FLAGS ?=
LEGION_WITH_FORTRAN ?= 1
# For Point and Rect typedefs
CC_FLAGS += -std=c++11
###########################################################################
#
# Don't change anything below here
Expand Down
4 changes: 1 addition & 3 deletions tutorial-fortran/fortran/06_privileges_accessor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ALT_MAPPERS ?= 0 # Include alternative mappers (not recommended)
# Put the binary file name here
OUTFILE ?= privileges
# List all the application source files here
GEN_FORTRAN_SRC ?= privileges.f90 # .c files
GEN_FORTRAN_SRC ?= privileges.f90 # .f90 files
GEN_GPU_SRC ?= # .cu files

# You can modify these variables, some will be appended to by the runtime makefile
Expand All @@ -39,8 +39,6 @@ NVCC_FLAGS ?=
GASNET_FLAGS ?=
LD_FLAGS ?=
LEGION_WITH_FORTRAN ?= 1
# For Point and Rect typedefs
CC_FLAGS += -std=c++11
###########################################################################
#
# Don't change anything below here
Expand Down
4 changes: 1 addition & 3 deletions tutorial-fortran/fortran/06_privileges_raw_rect_ptr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ALT_MAPPERS ?= 0 # Include alternative mappers (not recommended)
# Put the binary file name here
OUTFILE ?= privileges
# List all the application source files here
GEN_FORTRAN_SRC ?= privileges.f90 # .c files
GEN_FORTRAN_SRC ?= privileges.f90 # .f90 files
GEN_GPU_SRC ?= # .cu files

# You can modify these variables, some will be appended to by the runtime makefile
Expand All @@ -39,8 +39,6 @@ NVCC_FLAGS ?=
GASNET_FLAGS ?=
LD_FLAGS ?=
LEGION_WITH_FORTRAN ?= 1
# For Point and Rect typedefs
CC_FLAGS += -std=c++11
###########################################################################
#
# Don't change anything below here
Expand Down
4 changes: 1 addition & 3 deletions tutorial-fortran/fortran/07_partitioning/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ALT_MAPPERS ?= 0 # Include alternative mappers (not recommended)
# Put the binary file name here
OUTFILE ?= partitioning
# List all the application source files here
GEN_FORTRAN_SRC ?= partitioning.f90 # .c files
GEN_FORTRAN_SRC ?= partitioning.f90 # .f90 files
GEN_GPU_SRC ?= # .cu files

# You can modify these variables, some will be appended to by the runtime makefile
Expand All @@ -39,8 +39,6 @@ NVCC_FLAGS ?=
GASNET_FLAGS ?=
LD_FLAGS ?=
LEGION_WITH_FORTRAN ?= 1
# For Point and Rect typedefs
CC_FLAGS += -std=c++11
###########################################################################
#
# Don't change anything below here
Expand Down
4 changes: 1 addition & 3 deletions tutorial-fortran/fortran/attach_file/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ALT_MAPPERS ?= 0 # Include alternative mappers (not recommended)
# Put the binary file name here
OUTFILE ?= attach_file
# List all the application source files here
GEN_FORTRAN_SRC ?= attach_file.f90 # .c files
GEN_FORTRAN_SRC ?= attach_file.f90 # .f90 files
GEN_SRC ?= generate_hdf_file.cc
GEN_GPU_SRC ?= # .cu files

Expand All @@ -40,8 +40,6 @@ NVCC_FLAGS ?=
GASNET_FLAGS ?=
LD_FLAGS ?=
LEGION_WITH_FORTRAN ?= 1
# For Point and Rect typedefs
CC_FLAGS += -std=c++11
###########################################################################
#
# Don't change anything below here
Expand Down

0 comments on commit def6146

Please sign in to comment.