Skip to content

Commit

Permalink
squash! [pp->ttgg] Start refactoring the Makefiles.
Browse files Browse the repository at this point in the history
Remove the need for all .libs and .cudacpp files by making explicit
dependencies on the corresponding targets.
  • Loading branch information
hageboeck committed Aug 17, 2023
1 parent 366ddfc commit 817900e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ SYMMETRY = symmetry.o idenparts.o

LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458

all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp cudacpp# also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503)
all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp# also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503)

ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
override OMPFLAGS = -fopenmp
Expand Down Expand Up @@ -142,7 +142,7 @@ madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda
ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG)

# Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503)
$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs
$(CUDACPP_BUILDDIR)/$(PROG)_cpp: cudacpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o
$(FC) $(ALL_FCFLAGS) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS)
if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) $(ALL_FCFLAGS) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi

Expand Down Expand Up @@ -234,12 +234,9 @@ avx512z: $(PROG)_fortran $(DSIG_cudacpp)

clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn
$(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda
$(RM) -f .libs

cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src
$(MAKE) -f $(CUDACPP_MAKEFILE) cleanall
rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs
rm -f .libs

cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src
make -C ../../Source cleanall
Expand Down

0 comments on commit 817900e

Please sign in to comment.