source: trunk/MagicSoft/Simulation/Corsika/Mmcs614/Makefile@ 2602

Last change on this file since 2602 was 1444, checked in by blanch, 22 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 3.0 KB
Line 
1#============================================================
2# Makefile to compile modified 5.20 version of CORSIKA.
3#
4# Copyright (c) J C Gonzalez, 1998
5#============================================================
6#
7# Modified by C. Bigongiari 2001-11-06 to handle two different
8# codes for Linux and Alpha.
9# Now it compiles/link Corsika version 6.005
10#
11#==============================================================
12
13DESTDIR = .
14
15F77 = f77
16CC = cc
17CERNDIR = CERN
18ADDFLAGS =
19
20EXE_VERSION = c614nx
21
22###
23# compiler & linker options section
24###
25
26# machine dependencies
27SYSTEM = GENERIC
28
29## generic (alpha)
30GENERIC_CFLAGS = -I. -I/usr/include -DJC_UNDERSCORES ${ADDFLAGS}
31GENERIC_FFLAGS = ${GENERIC_CFLAGS}
32GENERIC_EXE = ${EXE_VERSION}-generic
33GENERIC_LIBS = -lm -lc
34GENERIC_CC = cc
35GENERIC_F77 = f77
36GENERIC_SRC = c614nx-osf.f
37
38## osf (alpha)
39OSF_CFLAGS = -I. -I/usr/include -DJC_UNDERSCORES ${ADDFLAGS}
40OSF_FFLAGS = ${OSF_CFLAGS}
41OSF_EXE = ${EXE_VERSION}-osf
42OSF_LIBS = -lm -lc
43OSF_CC = cc
44OSF_F77 = f77
45OSF_SRC = c614nx-osf.f
46
47## linux
48LINUX_CFLAGS = -I. -I/usr/include -funderscoring -DJC_UNDERSCORES \
49 -m486 -DCPU=686 ${ADDFLAGS}
50LINUX_FFLAGS = ${LINUX_CFLAGS}
51LINUX_EXE = ${EXE_VERSION}-linux
52LINUX_LIBS = -lm -lc
53LINUX_CC = gcc
54LINUX_F77 = g77
55LINUX_SRC = c614nx-linux.f
56
57# choose this machine values
58F77 = ${${SYSTEM}_F77}
59CC = ${${SYSTEM}_CC}
60CFLAGS = ${${SYSTEM}_CFLAGS}
61FFLAGS = ${${SYSTEM}_FFLAGS}
62LIBS = ${${SYSTEM}_LIBS}
63SRC = ${${SYSTEM}_SRC}
64
65###
66# miscelanea
67###
68
69CERNDIR = CERN
70
71###
72# files section
73###
74
75HEADERS =
76
77FSRCS = \
78 gheisha600.f venus.f ${SRC}
79
80CSRCS = \
81 jcio.c jcdate.c timer.c atmo.c
82
83ALLOBJS = ${FSRCS:.f=.o} ${CSRCS:.c=.o}
84
85PROGRAM = ${${SYSTEM}_EXE}
86
87help:
88 @echo ''
89 @echo 'Usage::'
90 @echo ''
91 @echo ' make help shows this help or'
92 @echo ' make clean cleans-up garbage or'
93 @echo ' make all [ SYSTEM = { OSF | LINUX | GENERIC} ]'
94 @echo ' compiles with pre-defined flags for'
95 @echo ' OSF, Linux of Unix'
96 @echo ''
97 @echo 'Additionally, you can add to your command line ADDFLAGS=<flags>'
98 @echo 'to include any new flag you want.'
99 @echo ''
100 @echo 'In case of problems, please contact to <gonzalez@mppmu.mpg.de>'
101 @echo ''
102
103all: message ${PROGRAM}
104
105message:
106 @echo "============================================================"
107 @echo " Compilation of CORSIKA ("${EXE_VERSION}")"
108 @echo " Target machine => `uname -a`"
109 @echo " System choosen => "${SYSTEM}
110 @echo " Date: `date`"
111 @echo "============================================================"
112 @echo ''
113
114${PROGRAM}: ${ALLOBJS}
115 @echo -n " . . . and linking -> "${PROGRAM}" . . . "
116 $(F77) ${FFLAGS} -o ${PROGRAM} ${ALLOBJS} ${LIBS} ${XLIB}
117 @echo "done."
118
119.f.o:
120 @echo "Compiling "$<" . . ."
121 $(F77) -c $(FFLAGS) $< -o $@
122
123.c.o:
124 @echo "Compiling "$<" . . ."
125 $(CC) -c $(CFLAGS) $< -o $@
126
127clean:
128 @echo "Cleaning . . ."
129 @rm *.o *~ core *.BAK > /dev/null 2>&1 || echo "...already clean."
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
Note: See TracBrowser for help on using the repository browser.