aboutsummaryrefslogtreecommitdiff
path: root/src/make.configuration.defn
blob: 37d5b6024c92f3313a6ad1c87ecc540ede619958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Main make.code.defn file for thorn PETSc_Elliptic
# $Header$


# on all systems: PETSc may have been build with X11 support, which
# needs to included here.

# on linux system: the lapack libs (in rpms) are compiled with f2c/g77
# and need the -lg2c or -lf2c to be linked
# keep them at the end of lapack


### check if PETSC_DIR/PETSC_ARCH are set, bail out if not

ifeq ($(strip $(PETSC_DIR)), )
$(NAME): MissingPETSC_DIR
.pseudo: MissingPETSC_DIR
MissingPETSC_DIR:
	@echo "PETSc: need environment variable PETSC_DIR for compliling EllPETSc"
	@echo "PETSc: set PETSC_DIR or remove EllPETSc from Thornlist"
	exit 2
endif

ifeq ($(strip $(PETSC_ARCH)), )
$(NAME): MissingPETSC_ARCH
.pseudo: MissingPETSC_ARCH
MissingPETSC_ARCH:
	@echo "PETSc: need environment variable PETSC_ARCH for compliling EllPETSc"
	@echo "PETSc: set PETSC_ARCH or remove EllPETSc from Thornlist"
	exit 2
endif



LIBDIRS += $(PETSC_DIR)/lib/libO/$(PETSC_ARCH) $(X_LIB_DIR)


### PETSC on the T3E
ifeq ($(PETSC_ARCH),t3e)
	echo "No T3E support"
	exit 2
	MYLIBS := petscts petscsnes  petscsles \
	petscmat  petscvec  petscsys X11 sci
	
	LIBS = $(MYLIBS)

endif

### PETSC on the SGI
ifeq ($(PETSC_ARCH),sgi)
	echo "No SGI support"
	exit 2
	MYLIBS := petscts petscsnes  petscsles \
	petscmat  petscvec  petscsys X11 \
	complib.sgimath

	LIBS = $(MYLIBS)

endif

### PETSC on linux
ifeq ($(PETSC_ARCH),linux)
	MYLIBS := petsc petscdm petsccontrib \
	petscts petscsnes  petscsles \
	petscmat  petscvec  \
	lapack blas g2c \
	mpich X11 $(LIBS) 

	LIBS	= $(MYLIBS)

	EXTRAFLAGS = -I$(PETSC_DIR)/bmake/$(PETSC_ARCH)/base
endif