Skip to content
Snippets Groups Projects
Commit a7ebe74f authored by Douglas Guptill's avatar Douglas Guptill
Browse files

latest Makefile tweaks

parent 4016ce08
No related branches found
No related tags found
No related merge requests found
...@@ -54,15 +54,19 @@ all: $(LIBFILE) ...@@ -54,15 +54,19 @@ all: $(LIBFILE)
$(LIBFILE): $(OBJECTS) $(UTILS) $(LIBFILE): $(OBJECTS) $(UTILS)
$(AR) -rv $(LIBFILE) $(OBJECTS) >$(LIBFILE).ar $(AR) -rv $(LIBFILE) $(OBJECTS) >$(LIBFILE).ar
# echo "--"
# echo "compiler output...."
# more $(COMPILE_OUT)
.PHONY: objclean .PHONY: objclean
objclean: objclean:
rm -f *.o $(COMPILE_OUT) rm -f *.o $(COMPILE_OUT)
.PHONY: clean .PHONY: clean
clean: objclean clean: objclean
rm -f $(LIBFILE) rm -f $(LIBFILE) $(LIBFILE).ar
.PHONY: more-output
more-output:
@echo "--"
@echo "compiler output from `pwd`"
@if test -e $(COMPILE_OUT) ; then more $(COMPILE_OUT) ; fi
@echo "--"
@echo "$(AR) output from `pwd`"
@if test -e $(LIBFILE).ar ; then more $(LIBFILE).ar ; fi
...@@ -81,13 +81,6 @@ $(BIN): subdirs $(OBJECTS) ...@@ -81,13 +81,6 @@ $(BIN): subdirs $(OBJECTS)
$(F90) $(FFLAGS) $(OPTIONS) $(OBJECTS) $(LIBS) -o $(BIN) \ $(F90) $(FFLAGS) $(OPTIONS) $(OBJECTS) $(LIBS) -o $(BIN) \
1>>$(BIN).link.stdout 2>>$(BIN).link.stderr 1>>$(BIN).link.stdout 2>>$(BIN).link.stderr
# echo "--"
# echo "compiler output...."
# more $(COMPILE_OUT)
# echo "--"
# echo "linker output...."
# more $(BIN).link.stderr
# more $(BIN).link.stdout
.PHONY: install .PHONY: install
install: install:
...@@ -116,3 +109,16 @@ clean: objclean ...@@ -116,3 +109,16 @@ clean: objclean
cd RESAMPLE; make $@ cd RESAMPLE; make $@
rm -f $(BIN) $(BIN).link rm -f $(BIN) $(BIN).link
.PHONY: more-output
more-output:
cd CASCADE; make $@
cd NN; make $@
cd OCTREE; make $@
cd RESAMPLE; make $@
@echo "--"
@echo "compiler output from `pwd`"
@if test -e $(COMPILE_OUT) ; then more $(COMPILE_OUT) ; fi
@echo "--"
@echo "linker output...."
@if test -e $(BIN).link.stdout ; then more $(BIN).link.stdout ; fi
@if test -e $(BIN).link.stderr ; then more $(BIN).link.stderr ; fi
...@@ -17,14 +17,11 @@ WSMP_LIB = -L$(WSMP_DIR) -lpwsmp64 ...@@ -17,14 +17,11 @@ WSMP_LIB = -L$(WSMP_DIR) -lpwsmp64
# Define FORTRAN compiler flags....................... # Define FORTRAN compiler flags.......................
# #
FFLAGS=-fastsse -pc 64 -Kieee FFLAGS=-fastsse -pc 64 -Kieee -tp amd64
# Define C compiler flags............................. # Define C compiler flags.............................
# #
CFLAGS=-fastsse -pc 64 -Kieee CFLAGS=-fastsse -pc 64 -Kieee -tp amd64
# full speed ahead and damn the torpedos..................
#
# compile rules....................................... # compile rules.......................................
# #
...@@ -49,9 +46,6 @@ COMPILE_OUT=$(NAME).compile ...@@ -49,9 +46,6 @@ COMPILE_OUT=$(NAME).compile
# Libraries................ # Libraries................
# #
# libs removed on p690...
# -lacml
# -lpthread
LIBS = \ LIBS = \
-LOCTREE -lOctree$(BITS) \ -LOCTREE -lOctree$(BITS) \
...@@ -61,7 +55,8 @@ LIBS = \ ...@@ -61,7 +55,8 @@ LIBS = \
-LRESAMPLE -lresample$(BITS) \ -LRESAMPLE -lresample$(BITS) \
-L$(PGPLOT) -lpgplot \ -L$(PGPLOT) -lpgplot \
-L/usr/X11R6/lib64 -lX11 \ -L/usr/X11R6/lib64 -lX11 \
$(WSMP_LIB) $(WSMP_LIB) \
-lacml -lpthread
...@@ -10,12 +10,12 @@ WSMP_DIR = /home/beaumnt1/software/wsmp/lib/Power4 ...@@ -10,12 +10,12 @@ WSMP_DIR = /home/beaumnt1/software/wsmp/lib/Power4
# for 32 bit compile.................................. # for 32 bit compile..................................
# #
AR=ar # AR=ar
BITS=-q32 # BITS=-q32
OPTIONS = -bmaxdata:0x80000000 -bhalt:0 -bnoquiet # OPTIONS = -bmaxdata:0x80000000 -bhalt:0 -bnoquiet
PGPLOT = /home/beaumnt1/software/pgplot-5.2.2 # PGPLOT = /home/beaumnt1/software/pgplot-5.2.2
WSMP_LIB = -L$(WSMP_DIR) -lpwsmp # WSMP_LIB = -L$(WSMP_DIR) -lpwsmp
FLG64= # FLG64=
# for 64 bit compile.................................. # for 64 bit compile..................................
# #
...@@ -42,36 +42,34 @@ FLG64=-b64 ...@@ -42,36 +42,34 @@ FLG64=-b64
# -qflttrap=overflow:underflow:zerodivide:invalid:NANQ:enable # -qflttrap=overflow:underflow:zerodivide:invalid:NANQ:enable
# take -qextchk out for the final compile # take -qextchk out for the final compile
# -O2 -qstrict # change -qhalt=e to -qhalt=s, after verifying that the errors
# FFLAGS = -g -O0 -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \ # all come from MPI calls.
#-qmaxmem=-1 \ FFLAGS = -g -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
#-qcheck -qwarn64 \ -qmaxmem=-1 \
#-qfloat=nomaf:nofold:norsqrt:strictnmaf \ -qcheck -qwarn64 \
#-qflttrap=overflow:underflow:zerodivide:invalid:NANQ:enable \ -qfloat=nomaf:nofold:norsqrt:strictnmaf \
#-qsigtrap \ -qflttrap=overflow:underflow:zerodivide:invalid:NANQ:enable \
#-qhalt=e -qsigtrap \
# -qextchk -qhalt=e -qextchk
# Define C compiler flags............................. # Define C compiler flags.............................
# #
# take -qextchk out for the final compile # take -qextchk out for the final compile
#CFLAGS = -g -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \ CFLAGS = -g -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
#-qcheck -qwarn64 \ -qcheck -qwarn64 \
#-qfloat=nomaf:nofold:norsqrt \ -qfloat=nomaf:nofold:norsqrt \
#-qflttrap=overflow:underflow:zerodivide:invalid:enable \ -qflttrap=overflow:underflow:zerodivide:invalid:enable \
#-qhalt=e -qhalt=e -qextchk
# -qextchk
# full speed ahead and damn the torpedos.................. # full speed ahead and damn the torpedos..................
# #
FFLAGS = -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \ # FFLAGS = -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
-qmaxmem=-1 \ # -qmaxmem=-1 \
-qfloat=nomaf:nofold:norsqrt:strictnmaf \ # -qfloat=nomaf:nofold:norsqrt:strictnmaf \
-qhalt=e # -qhalt=e
CFLAGS = -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \ # CFLAGS = -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
-qfloat=nomaf:nofold:norsqrt \ # -qfloat=nomaf:nofold:norsqrt \
-qhalt=e # -qhalt=e
# compile rules....................................... # compile rules.......................................
...@@ -80,28 +78,30 @@ COMPILE_OUT=$(NAME)$(BITS).compile ...@@ -80,28 +78,30 @@ COMPILE_OUT=$(NAME)$(BITS).compile
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .o .c .f .f90 .SUFFIXES: .o .c .f .f90
.f90.o: .f90.o:
@echo "--" >>$(COMPILE_OUT) 2>&1 @echo "--" >>$(COMPILE_OUT) 2>&1
@echo "xlf is `which xlf`" >>$(COMPILE_OUT) 2>&1 @echo "OBJECT_MODE should be 64, is ${OBJECT_MODE}" >>$(COMPILE_OUT) 2>&1
@echo "$(F90) -qsuffix=f=f90 $(FFLAGS) -c $<" >>$(COMPILE_OUT) 2>&1 @echo "xlf is `which xlf`" >>$(COMPILE_OUT) 2>&1
$(F90) -qsuffix=f=f90 $(FFLAGS) -c $< >>$(COMPILE_OUT) 2>&1 @echo "$(F90) -qsuffix=f=f90 $(FFLAGS) -c $<" >>$(COMPILE_OUT) 2>&1
$(F90) -qsuffix=f=f90 $(FFLAGS) -c $< >>$(COMPILE_OUT) 2>&1
.f.o: .f.o:
@echo "--" >>$(COMPILE_OUT) 2>&1 @echo "--" >>$(COMPILE_OUT) 2>&1
@echo "xlf is `which xlf`" >>$(COMPILE_OUT) 2>&1 @echo "OBJECT_MODE should be 64, is ${OBJECT_MODE}" >>$(COMPILE_OUT) 2>&1
@echo "$(F77) -qsuffix=f=f $(FFLAGS) -c $<" >>$(COMPILE_OUT) 2>&1 @echo "xlf is `which xlf`" >>$(COMPILE_OUT) 2>&1
$(F77) -qsuffix=f=f $(FFLAGS) -c $< >>$(COMPILE_OUT) 2>&1 @echo "$(F77) -qsuffix=f=f $(FFLAGS) -c $<" >>$(COMPILE_OUT) 2>&1
$(F77) -qsuffix=f=f $(FFLAGS) -c $< >>$(COMPILE_OUT) 2>&1
.c.o: .c.o:
@echo "--" >>$(COMPILE_OUT) 2>&1 @echo "--" >>$(COMPILE_OUT) 2>&1
@echo "$(CC) $(CFLAGS) -c $<" >>$(COMPILE_OUT) 2>&1 @echo "OBJECT_MODE should be 64, is ${OBJECT_MODE}" >>$(COMPILE_OUT) 2>&1
$(CC) $(CFLAGS) -c $< >>$(COMPILE_OUT) 2>&1 @echo "$(CC) $(CFLAGS) -c $<" >>$(COMPILE_OUT) 2>&1
$(CC) $(CFLAGS) -c $< >>$(COMPILE_OUT) 2>&1
# Libraries................ # Libraries................
# #
# libs removed on p690... # libs removed on p690...
# -lacml # -lacml
# -lpthread
LIBS = \ LIBS = \
-LOCTREE -lOctree$(BITS) \ -LOCTREE -lOctree$(BITS) \
...@@ -111,7 +111,7 @@ LIBS = \ ...@@ -111,7 +111,7 @@ LIBS = \
-L$(PGPLOT) -lpgplot \ -L$(PGPLOT) -lpgplot \
-L/usr/lpp/X11 -lX11 \ -L/usr/lpp/X11 -lX11 \
$(WSMP_LIB) \ $(WSMP_LIB) \
-LRESAMPLE -lresample$(BITS) -LRESAMPLE -lresample$(BITS) \
-lpthread -lhm -lhu -lm_r
...@@ -9,19 +9,11 @@ OBJECTS_NN_c = stack.o stackpair.o volume.o ...@@ -9,19 +9,11 @@ OBJECTS_NN_c = stack.o stackpair.o volume.o
all: $(LIBFILE_f) $(LIBFILE_c) all: $(LIBFILE_f) $(LIBFILE_c)
$(LIBFILE_f): $(OBJECTS_NN_f) $(LIBFILE_f): $(OBJECTS_NN_f)
$(AR) -rv $(LIBFILE_f) $(OBJECTS_NN_f) >$(LIBFILE_f).ar $(AR) -rv $(LIBFILE_f) $(OBJECTS_NN_f) >$(LIBFILE_f).ar
mv -f $(COMPILE_OUT) $(COMPILE_OUT)_f if test -f $(COMPILE_OUT) ; then mv -f $(COMPILE_OUT) $(COMPILE_OUT)_f; fi
# echo "--"
# echo "compiler output...."
# more $(COMPILE_OUT)_f
$(LIBFILE_c): $(OBJECTS_NN_c) $(LIBFILE_c): $(OBJECTS_NN_c)
$(AR) -rv $(LIBFILE_c) $(OBJECTS_NN_c) >$(LIBFILE_c).ar $(AR) -rv $(LIBFILE_c) $(OBJECTS_NN_c) >$(LIBFILE_c).ar
mv -f $(COMPILE_OUT) $(COMPILE_OUT)_c if test -f $(COMPILE_OUT) ; then mv -f $(COMPILE_OUT) $(COMPILE_OUT)_f; fi
# echo "--"
# echo "compiler output...."
# more $(COMPILE_OUT)_c
.PHONY: objclean .PHONY: objclean
objclean: objclean:
...@@ -29,5 +21,15 @@ objclean: ...@@ -29,5 +21,15 @@ objclean:
.PHONY: clean .PHONY: clean
clean: objclean clean: objclean
rm -f $(LIBFILE_f) $(LIBFILE_c) rm -f $(LIBFILE_f) $(LIBFILE_c) $(LIBFILE_f).ar $(LIBFILE_c).ar
.PHONY: more-output
more-output:
@echo "--"
@echo "compiler output from `pwd`"
@if test -e $(COMPILE_OUT)_f ; then more $(COMPILE_OUT)_f ; fi
@if test -e $(COMPILE_OUT)_c ; then more $(COMPILE_OUT)_c ; fi
@echo "--"
@echo "$(AR) output from `pwd`"
@if test -e $(LIBFILE_f).ar ; then more $(LIBFILE_f).ar ; fi
@if test -e $(LIBFILE_c).ar ; then more $(LIBFILE_c).ar ; fi
...@@ -17,15 +17,19 @@ all: $(LIBFILE) ...@@ -17,15 +17,19 @@ all: $(LIBFILE)
$(LIBFILE): $(OBJECTS_OCTREE) $(LIBFILE): $(OBJECTS_OCTREE)
$(AR) -rv $(LIBFILE) $(OBJECTS_OCTREE) >$(LIBFILE).ar $(AR) -rv $(LIBFILE) $(OBJECTS_OCTREE) >$(LIBFILE).ar
# echo "--"
# echo "compiler output...."
# more $(COMPILE_OUT)
.PHONY: objclean .PHONY: objclean
objclean: objclean:
rm -f *.o $(COMPILE_OUT) rm -f *.o $(COMPILE_OUT)
.PHONY: clean .PHONY: clean
clean: objclean clean: objclean
rm -f $(LIBFILE) rm -f $(LIBFILE) $(LIBFILE).ar
.PHONY: more-output
more-output:
@echo "--"
@echo "compiler output from `pwd`"
@if test -e $(COMPILE_OUT) ; then more $(COMPILE_OUT) ; fi
@echo "--"
@echo "$(AR) output from `pwd`"
@if test -e $(LIBFILE).ar ; then more $(LIBFILE).ar ; fi
...@@ -21,15 +21,19 @@ all: $(LIBFILE) ...@@ -21,15 +21,19 @@ all: $(LIBFILE)
$(LIBFILE): $(OBJECTS) $(LIBFILE): $(OBJECTS)
$(AR) -rv $(LIBFILE) $(OBJECTS) >$(LIBFILE).ar $(AR) -rv $(LIBFILE) $(OBJECTS) >$(LIBFILE).ar
# echo "--"
# echo "compiler output...."
# more $(COMPILE_OUT)
.PHONY: objclean .PHONY: objclean
objclean: objclean:
rm -f *.o $(COMPILE_OUT) rm -f *.o $(COMPILE_OUT)
.PHONY: clean .PHONY: clean
clean: objclean clean: objclean
rm -f $(LIBFILE) rm -f $(LIBFILE) $(LIBFILE).ar
.PHONY: more-output
more-output:
@echo "--"
@echo "compiler output from `pwd`"
@if test -e $(COMPILE_OUT) ; then more $(COMPILE_OUT) ; fi
@echo "--"
@echo "$(AR) output from `pwd`"
@if test -e $(LIBFILE).ar ; then more $(LIBFILE).ar ; fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment