| 1 |
######################################################################### |
| 2 |
# |
| 3 |
# Make.sys for X11 shared compilation on Mac OS X |
| 4 |
# |
| 5 |
# This Make.sys uses the MacPorts and requires the following packages: |
| 6 |
# |
| 7 |
# xorg-libX11 |
| 8 |
# xorg-libXmu |
| 9 |
# tcl |
| 10 |
# tk |
| 11 |
# mesa |
| 12 |
# libGLU |
| 13 |
# fftw-3 |
| 14 |
# ImageMagick (optional, but highly recommended) |
| 15 |
# |
| 16 |
######################################################################## |
| 17 |
|
| 18 |
|
| 19 |
#------------------------------------------------------------------------ |
| 20 |
# if you have a GNU make it is better to set the MAKE variable to point |
| 21 |
# to gnu make |
| 22 |
#------------------------------------------------------------------------ |
| 23 |
MAKE = make |
| 24 |
|
| 25 |
|
| 26 |
#------------------------------------------------------------------------ |
| 27 |
# compilers & flags |
| 28 |
#------------------------------------------------------------------------ |
| 29 |
# C-preprocessor flags |
| 30 |
CPPFLAGS ?= |
| 31 |
# C-compiler flags |
| 32 |
CFLAGS += -ffast-math -funroll-loops -fPIC -pedantic -Wall |
| 33 |
|
| 34 |
CC = gcc |
| 35 |
#LDLIB = -ldl |
| 36 |
MATH = -lm -lc |
| 37 |
|
| 38 |
|
| 39 |
FFLAGS += -static-libgfortran -static-libgcc -fdefault-double-8 -fdefault-real-8 -O2 |
| 40 |
FC = gfortran |
| 41 |
|
| 42 |
#------------------------------------------- |
| 43 |
#debug options |
| 44 |
#CFLAGS = -g |
| 45 |
#------------------------------------------- |
| 46 |
|
| 47 |
|
| 48 |
#------------------------------------------------------------------------ |
| 49 |
# X-libraries & include files |
| 50 |
#------------------------------------------------------------------------ |
| 51 |
X_LIB = -lXmu -lX11 |
| 52 |
X_INCDIR = -I/opt/local/include |
| 53 |
|
| 54 |
#------------------------------------------------------------------------ |
| 55 |
# EXTERNAL LIBRARIES: Togl |
| 56 |
# N.B.: Togl from macports is not OK, let's compile it from sources |
| 57 |
# |
| 58 |
COMPILE_TOGL = yes |
| 59 |
TOGL_OPTIONS = --exec-prefix=$(TOPDIR)/external --enable-shared --with-tcl=/opt/local/lib --with-tk=/opt/local/lib \ |
| 60 |
--with-x CFLAGS=-I/opt/local/include --x-includes=/opt/local/include --x-libraries=/opt/local/lib |
| 61 |
|
| 62 |
#------------------------------------------------------------------------ |
| 63 |
# |
| 64 |
# Libraries |
| 65 |
# |
| 66 |
|
| 67 |
TCL_LIB = -L$(TOPDIR)/external/lib -ltcl$(TCL_VER2) |
| 68 |
TK_LIB = -ltk$(TCL_VER2) |
| 69 |
TOGL_LIB = -lTogl$(TOGL_VER) |
| 70 |
GLU_LIB = -L/opt/local/lib -lGLU |
| 71 |
GL_LIB = -lGL |
| 72 |
FFTW3_LIB = -L/opt/local/lib -lfftw3 |
| 73 |
# this is only used for some testing purposes |
| 74 |
#MESCHACH_LIB = -lmeschach |
| 75 |
|
| 76 |
# |
| 77 |
# Include directories |
| 78 |
# |
| 79 |
|
| 80 |
TCL_INCDIR = -I$(TOPDIR)/external/include |
| 81 |
TK_INCDIR = |
| 82 |
TOGL_INCDIR = |
| 83 |
GL_INCDIR = -I/opt/local/include |
| 84 |
FFTW3_INCDIR = |
| 85 |
# this is only used for some testing purposes |
| 86 |
#MESCHACH_INCDIR = |
| 87 |
|
| 88 |
#------------------------------------------------------------------------ |