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)
$(LIBFILE): $(OBJECTS) $(UTILS)
$(AR) -rv $(LIBFILE) $(OBJECTS) >$(LIBFILE).ar
# echo "--"
# echo "compiler output...."
# more $(COMPILE_OUT)
.PHONY: objclean
objclean:
rm -f *.o $(COMPILE_OUT)
.PHONY: clean
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)
$(F90) $(FFLAGS) $(OPTIONS) $(OBJECTS) $(LIBS) -o $(BIN) \
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
install:
......@@ -116,3 +109,16 @@ clean: objclean
cd RESAMPLE; make $@
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
# Define FORTRAN compiler flags.......................
#
FFLAGS=-fastsse -pc 64 -Kieee
FFLAGS=-fastsse -pc 64 -Kieee -tp amd64
# Define C compiler flags.............................
#
CFLAGS=-fastsse -pc 64 -Kieee
# full speed ahead and damn the torpedos..................
#
CFLAGS=-fastsse -pc 64 -Kieee -tp amd64
# compile rules.......................................
#
......@@ -49,9 +46,6 @@ COMPILE_OUT=$(NAME).compile
# Libraries................
#
# libs removed on p690...
# -lacml
# -lpthread
LIBS = \
-LOCTREE -lOctree$(BITS) \
......@@ -61,7 +55,8 @@ LIBS = \
-LRESAMPLE -lresample$(BITS) \
-L$(PGPLOT) -lpgplot \
-L/usr/X11R6/lib64 -lX11 \
$(WSMP_LIB)
$(WSMP_LIB) \
-lacml -lpthread
......@@ -10,12 +10,12 @@ WSMP_DIR = /home/beaumnt1/software/wsmp/lib/Power4
# for 32 bit compile..................................
#
AR=ar
BITS=-q32
OPTIONS = -bmaxdata:0x80000000 -bhalt:0 -bnoquiet
PGPLOT = /home/beaumnt1/software/pgplot-5.2.2
WSMP_LIB = -L$(WSMP_DIR) -lpwsmp
FLG64=
# AR=ar
# BITS=-q32
# OPTIONS = -bmaxdata:0x80000000 -bhalt:0 -bnoquiet
# PGPLOT = /home/beaumnt1/software/pgplot-5.2.2
# WSMP_LIB = -L$(WSMP_DIR) -lpwsmp
# FLG64=
# for 64 bit compile..................................
#
......@@ -42,36 +42,34 @@ FLG64=-b64
# -qflttrap=overflow:underflow:zerodivide:invalid:NANQ:enable
# take -qextchk out for the final compile
# -O2 -qstrict
# FFLAGS = -g -O0 -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
#-qmaxmem=-1 \
#-qcheck -qwarn64 \
#-qfloat=nomaf:nofold:norsqrt:strictnmaf \
#-qflttrap=overflow:underflow:zerodivide:invalid:NANQ:enable \
#-qsigtrap \
#-qhalt=e
# -qextchk
# change -qhalt=e to -qhalt=s, after verifying that the errors
# all come from MPI calls.
FFLAGS = -g -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
-qmaxmem=-1 \
-qcheck -qwarn64 \
-qfloat=nomaf:nofold:norsqrt:strictnmaf \
-qflttrap=overflow:underflow:zerodivide:invalid:NANQ:enable \
-qsigtrap \
-qhalt=e -qextchk
# Define C compiler flags.............................
#
# take -qextchk out for the final compile
#CFLAGS = -g -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
#-qcheck -qwarn64 \
#-qfloat=nomaf:nofold:norsqrt \
#-qflttrap=overflow:underflow:zerodivide:invalid:enable \
#-qhalt=e
# -qextchk
CFLAGS = -g -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
-qcheck -qwarn64 \
-qfloat=nomaf:nofold:norsqrt \
-qflttrap=overflow:underflow:zerodivide:invalid:enable \
-qhalt=e -qextchk
# full speed ahead and damn the torpedos..................
#
FFLAGS = -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
-qmaxmem=-1 \
-qfloat=nomaf:nofold:norsqrt:strictnmaf \
-qhalt=e
CFLAGS = -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
-qfloat=nomaf:nofold:norsqrt \
-qhalt=e
# FFLAGS = -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
# -qmaxmem=-1 \
# -qfloat=nomaf:nofold:norsqrt:strictnmaf \
# -qhalt=e
# CFLAGS = -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
# -qfloat=nomaf:nofold:norsqrt \
# -qhalt=e
# compile rules.......................................
......@@ -80,28 +78,30 @@ COMPILE_OUT=$(NAME)$(BITS).compile
.SUFFIXES:
.SUFFIXES: .o .c .f .f90
.f90.o:
@echo "--" >>$(COMPILE_OUT) 2>&1
@echo "xlf is `which xlf`" >>$(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
@echo "--" >>$(COMPILE_OUT) 2>&1
@echo "OBJECT_MODE should be 64, is ${OBJECT_MODE}" >>$(COMPILE_OUT) 2>&1
@echo "xlf is `which xlf`" >>$(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:
@echo "--" >>$(COMPILE_OUT) 2>&1
@echo "xlf is `which xlf`" >>$(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
@echo "--" >>$(COMPILE_OUT) 2>&1
@echo "OBJECT_MODE should be 64, is ${OBJECT_MODE}" >>$(COMPILE_OUT) 2>&1
@echo "xlf is `which xlf`" >>$(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:
@echo "--" >>$(COMPILE_OUT) 2>&1
@echo "$(CC) $(CFLAGS) -c $<" >>$(COMPILE_OUT) 2>&1
$(CC) $(CFLAGS) -c $< >>$(COMPILE_OUT) 2>&1
@echo "--" >>$(COMPILE_OUT) 2>&1
@echo "OBJECT_MODE should be 64, is ${OBJECT_MODE}" >>$(COMPILE_OUT) 2>&1
@echo "$(CC) $(CFLAGS) -c $<" >>$(COMPILE_OUT) 2>&1
$(CC) $(CFLAGS) -c $< >>$(COMPILE_OUT) 2>&1
# Libraries................
#
# libs removed on p690...
# -lacml
# -lpthread
LIBS = \
-LOCTREE -lOctree$(BITS) \
......@@ -111,7 +111,7 @@ LIBS = \
-L$(PGPLOT) -lpgplot \
-L/usr/lpp/X11 -lX11 \
$(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
all: $(LIBFILE_f) $(LIBFILE_c)
$(LIBFILE_f): $(OBJECTS_NN_f)
$(AR) -rv $(LIBFILE_f) $(OBJECTS_NN_f) >$(LIBFILE_f).ar
mv -f $(COMPILE_OUT) $(COMPILE_OUT)_f
# echo "--"
# echo "compiler output...."
# more $(COMPILE_OUT)_f
if test -f $(COMPILE_OUT) ; then mv -f $(COMPILE_OUT) $(COMPILE_OUT)_f; fi
$(LIBFILE_c): $(OBJECTS_NN_c)
$(AR) -rv $(LIBFILE_c) $(OBJECTS_NN_c) >$(LIBFILE_c).ar
mv -f $(COMPILE_OUT) $(COMPILE_OUT)_c
# echo "--"
# echo "compiler output...."
# more $(COMPILE_OUT)_c
if test -f $(COMPILE_OUT) ; then mv -f $(COMPILE_OUT) $(COMPILE_OUT)_f; fi
.PHONY: objclean
objclean:
......@@ -29,5 +21,15 @@ objclean:
.PHONY: clean
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)
$(LIBFILE): $(OBJECTS_OCTREE)
$(AR) -rv $(LIBFILE) $(OBJECTS_OCTREE) >$(LIBFILE).ar
# echo "--"
# echo "compiler output...."
# more $(COMPILE_OUT)
.PHONY: objclean
objclean:
rm -f *.o $(COMPILE_OUT)
.PHONY: clean
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)
$(LIBFILE): $(OBJECTS)
$(AR) -rv $(LIBFILE) $(OBJECTS) >$(LIBFILE).ar
# echo "--"
# echo "compiler output...."
# more $(COMPILE_OUT)
.PHONY: objclean
objclean:
rm -f *.o $(COMPILE_OUT)
.PHONY: clean
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