source: trunk/MagicSoft/Simulation/Corsika/Mmcs/Makefile@ 10100

Last change on this file since 10100 was 401, checked in by harald, 25 years ago
only to run it on linux without a error message at the begining.
File size: 4.2 KB
Line 
1#============================================================
2# Makefile to compile modified 5.20 version of CORSIKA.
3#
4# Copyright (c) J C Gonzalez, 1998
5#============================================================
6
7DESTDIR = .
8
9F77 = f77
10CC = cc
11CERNDIR = CERN
12ADDFLAGS =
13
14EXE_VERSION = c520
15
16###
17# compiler & linker options section
18###
19
20# machine dependencies
21SYSTEM = GENERIC
22
23## generic (alpha)
24GENERIC_CFLAGS = -I. -I/usr/include -DJC_UNDERSCORES ${ADDFLAGS}
25GENERIC_FFLAGS = ${GENERIC_CFLAGS}
26GENERIC_EXE = ${EXE_VERSION}-generic
27GENERIC_LIBS = -lm -lc
28GENERIC_CC = cc
29GENERIC_F77 = f77
30
31## osf (alpha)
32OSF_CFLAGS = -I. -I/usr/include -DJC_UNDERSCORES ${ADDFLAGS}
33OSF_FFLAGS = ${OSF_CFLAGS}
34OSF_EXE = ${EXE_VERSION}-osf
35OSF_LIBS = -lm -lc
36OSF_CC = cc
37OSF_F77 = f77
38
39## linux
40LINUX_CFLAGS = -I. -I/usr/include -funderscoring -DJC_UNDERSCORES \
41 -m486 -DCPU=686 ${ADDFLAGS}
42LINUX_FFLAGS = ${LINUX_CFLAGS}
43LINUX_EXE = ${EXE_VERSION}-linux
44LINUX_LIBS = -lm -lc
45LINUX_CC = gcc
46LINUX_F77 = g77
47
48## aix (ibm rs6000)
49AIX_CFLAGS = -I. -I/usr/include -DJC_NO_UNDERSCORES ${ADDFLAGS}
50AIX_FFLAGS = ${AIX_CFLAGS}
51AIX_EXE = ${EXE_VERSION}-aix
52AIX_LIBS = -lm -lc -lbsd
53AIX_CC = cc
54AIX_F77 = xlf
55
56# choose this machine values
57F77 = ${${SYSTEM}_F77}
58CC = ${${SYSTEM}_CC}
59CFLAGS = ${${SYSTEM}_CFLAGS}
60FFLAGS = ${${SYSTEM}_FFLAGS}
61LIBS = ${${SYSTEM}_LIBS}
62
63###
64# miscelanea
65###
66
67CERNDIR = CERN
68
69###
70# files section
71###
72
73HEADERS =
74
75FSRCS = \
76 GHEISHA.f VENUS.f addang.f addani.f age.f amoeba.f \
77 amotry.f annih.f ausgab.f ausgb2.f avage.f avept.f \
78 bhabha.f block1.f box2.f box3.f box60.f box61.f \
79 box62.f box63.f box65.f box66.f box67.f box68.f \
80 box69.f box70.f box71.f box72.f box73.f box74.f \
81 brems.f cerenkov.f cghei.f cghini.f cghsig.f \
82 chisq.f compt.f coorin.f datac.f decay1.f decay6.f \
83 difrac.f dpfunc.f egs4.f egs4bd.f egsini.f electr.f \
84 em.f etadec.f flpsor.f fstack.f gam.f garndm.f \
85 gbrsgm.f gprsgm.f granor.f grndm.f hatch.f hdpm.f \
86 heigh.f hmeson.f howfar.f ininkg.f inprm.f isobar.f \
87 istack.f jadach.f kdecay.f leaddf.f ledeny.f \
88 lepacx.f longft.f lowup.f lpm.f main.f mitage.f \
89 mmol4.f mmolie.f moller.f mpoiss.f mpprop.f mscat.f \
90 mubrem.f mucoul.f mudecy.f mupair.f muprpr.f \
91 mutrac.f nihila.f nkg.f nsd.f nucint.f outend.f \
92 output.f pair.f pamaf.f parnum.f parrap.f pcl.f \
93 photo.f photon.f pi0dec.f pigen.f pigen1.f pigen2.f \
94 pparam.f prange.f prtime.f ptram.f ptran.f ptrans.f \
95 rangen.f rannor.f resdec.f rhof.f rmmaq.f rmmar.f \
96 rnegbi.f sdpm.f selcor.f shower.f single.f sobseq.f \
97 staend.f stankg.f start.f strdec.f tarint.f thick.f \
98 tobuf.f tstack.f tstend.f tstini.f tstout.f ucopy.f \
99 update.f uphi.f utqsea.f utqval.f vapor.f vendat.f \
100 venini.f venlnk.f vhmeso.f vstore.f vzero.f
101
102CSRCS = \
103 jcio.c jcdate.c
104
105ALLOBJS = ${FSRCS:.f=.o} ${CSRCS:.c=.o}
106
107PROGRAM = ${${SYSTEM}_EXE}
108
109help:
110 @echo ''
111 @echo 'Usage::'
112 @echo ''
113 @echo ' make help shows this help or'
114 @echo ' make clean cleans-up garbage or'
115 @echo ' make all [ SYSTEM = { OSF | LINUX | AIX | GENERIC} ]'
116 @echo ' compiles with pre-defined flags for'
117 @echo ' OSF, Linux or AIX flavour of Unix'
118 @echo ''
119 @echo 'Additionally, you can add to your command line ADDFLAGS=<flags>'
120 @echo 'to include any new flag you want.'
121 @echo ''
122 @echo 'In case of problems, please contact to <gonzalez@mppmu.mpg.de>'
123 @echo ''
124
125all: message ${PROGRAM}
126
127message:
128 @echo "============================================================"
129 @echo " Compilation of CORSIKA ("${EXE_VERSION}")"
130 @echo " Target machine => `uname -a`"
131 @echo " System choosed => "${SYSTEM}
132 @echo " Date: `date`"
133 @echo "============================================================"
134 @echo ''
135
136${PROGRAM}: ${ALLOBJS}
137 @echo -n " . . . and linking -> "${PROGRAM}" . . . "
138 $(F77) ${FFLAGS} -o ${PROGRAM} ${ALLOBJS} ${LIBS} ${XLIB}
139 @echo "done."
140
141.f.o:
142 @echo "Compiling "$<" . . ."
143 $(F77) -c $(FFLAGS) $< -o $@
144
145.c.o:
146 @echo "Compiling "$<" . . ."
147 $(CC) -c $(CFLAGS) $< -o $@
148
149script:
150 @sh ./c-script.sh
151
152clean:
153 @echo "Cleaning . . ."
154 @rm *.o *~ core *.BAK > /dev/null 2>&1 || echo "...already clean."
Note: See TracBrowser for help on using the repository browser.