1 |
# Fortran flags |
2 |
FC=g77 |
3 |
FFLAGS=-fvxt -fno-automatic -Wall -Wno-globals -fbounds-check |
4 |
# C flags |
5 |
CC=gcc |
6 |
CFLAGS=-Wall -O2 |
7 |
CFLADJ=-c |
8 |
|
9 |
# used libraries |
10 |
#LIBS=-L/cern/pro/lib -lkernlib -lpacklib -lgraflib -lmathlib -lnsl |
11 |
LIBS= `cernlib kernlib packlib graflib mathlib` |
12 |
|
13 |
template.exe: template-static |
14 |
|
15 |
# this directive links static libraries |
16 |
template-static: template.f trk_level2.f |
17 |
$(FC) $(FFLAGS) template.f -o template.exe $(TRK_GRND)/lib/libtrk.a $(LIBS) |
18 |
|
19 |
# the next directive link dinamyc library (.so) |
20 |
# NB! in order to link dynamically it must be added the library path to |
21 |
# LD_LIBRARY_PATH (in the ./bashrc) |
22 |
template-dynamic: template.f trk_level2.f |
23 |
$(FC) $(FFLAGS) -o template.exe template.f $(LIBS) -L$(TRK_GRND)/lib -ltrk |
24 |
|
25 |
|
26 |
clean: |
27 |
rm -f *.o |
28 |
rm -f *.exe |
29 |
rm -f *~ |
30 |
|