/[PAMELA software]/gpamela/Makefile
ViewVC logotype

Annotation of /gpamela/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.11 - (hide annotations) (download)
Tue Dec 6 11:34:07 2005 UTC (18 years, 11 months ago) by pam-ba
Branch: MAIN
Changes since 3.10: +1 -1 lines
new spectrometer geometry and internal magnetic field

1 cafagna 3.1 #
2     # Steering Makefile to create gpamelaX11 and gpamela executable
3     # First of all define the src files. One for each subdirectory
4     #
5     GPAMELASRCS= gpamela/ffuser.F gpamela/gdraws.F gpamela/gpadigi.F \
6     gpamela/gpal.F gpamela/gpdat.F \
7     gpamela/gpffr.F gpamela/gpfil.F gpamela/gpgaus.F \
8     gpamela/gpgeo.F gpamela/gphbk.F \
9     gpamela/gphit.F gpamela/gplook.F \
10     gpamela/gpmapa.F gpamela/gpmat.F gpamela/gpmed.F \
11     gpamela/gpn2g.F gpamela/gpnhit.F gpamela/gppama.F \
12     gpamela/gprhit.F gpamela/gprsht.F \
13     gpamela/gpsed.F gpamela/gpsptm.F \
14     gpamela/gpudat.F gpamela/gpudig.F gpamela/gpuffr.F \
15     gpamela/gpufil.F gpamela/gpugeo.F gpamela/gpuhbk.F \
16     gpamela/gpuhit.F gpamela/gpuini.F \
17     gpamela/gpukin.F gpamela/gpulas.F \
18     gpamela/gpumat.F gpamela/gpumed.F gpamela/gpuout.F \
19     gpamela/gpused.F gpamela/gpustep.F gpamela/gputra.F \
20     gpamela/gputre.F gpamela/gudigi.F \
21     gpamela/guhadr.F gpamela/gukine.F gpamela/guout.F \
22     gpamela/guphad.F gpamela/gustep.F \
23     gpamela/gutrak.F gpamela/gutrev.F \
24     gpamela/gviewyz.F gpamela/n2g.F \
25 pam-ba 3.9 gpamela/uginit.F gpamela/uglast.F \
26     gpamela/gprnhran.F
27 cafagna 3.1 GPCALSRCS = gpcal/gpcalv.F gpcal/gpce.F gpcal/gpdcal.F \
28     gpcal/gpg10c.F gpcal/gpg10.F gpcal/gpsica.F \
29     gpcal/gpucal.F gpcal/gpw2.F gpcal/gpw.F
30     GPCASSRCS = gpcas/gpcasv.F gpcas/gpdcas.F gpcas/gpucas.F
31     GPCATSRCS = gpcat/gpcatv.F gpcat/gpdcat.F gpcat/gpucat.F
32 pam-ba 3.9 GPFIELDSRCS = gpfield/flin3.F gpfield/gufld.F gpfield/gprbi.F \
33     gpfield/inter_B.F gpfield/inter_B_inner.F
34 cafagna 3.1 GPGARSRCS = gpgar/gpgacl.F gpgar/gpgapart.F gpgar/gpgarin.F \
35     gpgar/gpgarsel.F gpgar/gptogar.F gpgar/grinit.F
36     GPHYSSRCSRCS = gphys/gfluct.F
37     GPMAINSRCS = gpmain/gpmain.F
38     GPSPESRCS = gpspe/gpcp.F gpspe/gpdspe.F gpspe/gpfe.F \
39     gpspe/gpkap.F gpspe/gpmaspe.F gpspe/gproa.F \
40 pam-ba 3.9 gpspe/gpsitr.F gpspe/gpspema.F gpspe/gpspev.F gpspe/gpuspe.F \
41     gpspe/gprspe.F
42 cafagna 3.1 GPTOFSRCS = gptof/gpdtof.F gptof/gpscin.F gptof/gpscint.F \
43     gptof/gptofv.F gptof/gputof.F
44     GPTRDSRCS = gptrd/gpdtrd.F gptrd/gptrad.F gptrd/gptrdv.F \
45     gptrd/gputrd.F gptrd/gpxe.F gptrd/gpxtr.F \
46     gptrd/npoiss.F gptrd/xescape.F gptrd/xtrinteg.F \
47     gptrd/xtrinter.F gptrd/xtryield.F
48     GPXINTSRCS = gpxint/gxint.F gpxint/qnext.F
49     #
50     GPSRCS = $(GPAMELASRCS) $(GPCALSRCS) $(GPCASSRCS) $(GPCATSRCS) $(GPFIELDSRCS) $(GPGARSRCS) $(GPHYSSRCS) \
51     $(GPSPESRCS) $(GPTOFSRCS) $(GPTRDSRCS)
52     GPOBJS =$(addsuffix .o,$(basename ${GPSRCS}) )
53     GPDEPENDS =$(GPOBJS:.o=.d)
54     GPMAINOBJS =$(addsuffix .o,$(basename ${GPMAINSRCS}) )
55     GPMAINDEPENDS =$(GPMAINOBJS:.o=.d)
56     GPXINTOBJS =$(addsuffix .o,$(basename ${GPXINTSRCS}) )
57     GPXINTDEPENDS =$(GPXINTOBJS:.o=.d)
58     #
59     GEANTINC = gcdes
60     GPINC = gpcdes
61     CERNLIB = `cernlib geant,genlib,pawlib,graflib/X11,packlib,mathlib`
62     GPLIBDIR = ./lib
63 pam-ba 3.9 GPLIB = ${GPLIBDIR}/libgarfield-7.a
64 cafagna 3.1 #
65     BIN = ./bin
66     AUX = ./aux
67 pamela 3.4 AUXFILES = ${AUX}/gpfield.rz ${AUX}/GPAMELA.FFR ${AUX}/TRD_ATT.DAT ${AUX}/GARFIELD.GAR \
68 pam-ba 3.11 $(AUX)/xe_80_co2_20.gas $(AUX)/measure_n3_290302.rz $(AUX)/measure_n4_110402_corrected.rz $(AUX)/resxy_new.rz $(AUX)/INPUTSEED.DAT $(AUX)/readseeds.f $(AUX)/writeseeds.f
69 cafagna 3.1 GARFIELDSRC = ./garfield/src
70     #
71     INTERFLAGS = -DGPAMELA_UNIX -DGPAMELA_TYPE -DGPAMELA_X11 -DGPAMELA_INTER -DGPAMELA_HIGZ \
72     -DGPAMELA_GARFIELD -DGPAMELA_MANYWIRE -DGPAMELA_LONGLIST -DGPAMELA_BIGMAP
73     BATCHFLAGS = -DGPAMELA_UNIX -DGPAMELA_TYPE -DGPAMELA_GARFIELD -DGPAMELA_MANYWIRE -DGPAMELA_LONGLIST -DGPAMELA_BIGMAP
74     #
75     CC = gcc
76     FC = g77
77     DEBFLAGS = -g -fdebug-kludge
78     FFLAGS = -fvxt -fno-automatic -Wno-globals -I${GPINC} -I${GEANTINC} ${BATCHFLAGS}
79     LDFLAGS= ${GPLIB} ${CERNLIB}
80 pamela 3.3
81 cafagna 3.1
82     gpamelax11.exe: FFLAGS = -fvxt -fno-automatic -Wno-globals -I${GPINC} -I${GEANTINC} ${INTERFLAGS}
83     gpamelax11.exe: createdir ${GPLIBDIR}/libgarfield-7.a ${GPSRCS} ${GPOBJS} ${GPDEPENDS} ${GPXINTSRCS} ${GPXINTOBJS} ${GPXINTDEPENDS}
84     @echo Creating $@ .....
85     $(FC) -o ${BIN}/$@ ${GPOBJS} ${GPXINTOBJS} ${LDFLAGS}
86     @echo Removing object files .....
87     @rm -f ${GPOBJS} ${GPXINTOBJS}
88    
89     gpamela.exe: FFLAGS = -fvxt -fno-automatic -Wno-globals -I${GPINC} -I${GEANTINC} ${BATCHFLAGS}
90     gpamela.exe: createdir ${GPLIBDIR}/libgarfield-7.a ${GPSRCS} ${GPOBJS} ${GPDEPENDS} ${GPMAINSRCS} ${GPMAINOBJS} ${GPMAINDEPENDS}
91     @echo Creating $@ .....
92     $(FC) -o ${BIN}/$@ ${GPOBJS} ${GPMAINOBJS} ${LDFLAGS}
93     @echo Removing object files .....
94     @rm -f ${GPOBJS} ${GPMAINOBJS}
95    
96     gpamelax11_deb.exe: FFLAGS = -fvxt -fno-automatic -Wno-globals ${DEBFLAGS} -I${GPINC} -I${GEANTINC} ${INTERFLAGS}
97     gpamelax11_deb.exe: createdir ${GPLIBDIR}/libgarfield-7.a ${GPSRCS} ${GPOBJS} ${GPDEPENDS} ${GPXINTSRCS} ${GPXINTOBJS} ${GPXINTDEPENDS}
98     @echo Creating $@ .....
99     $(FC) -o ${BIN}/$@ ${GPOBJS} ${GPXINTOBJS} ${LDFLAGS}
100     @echo Removing object files .....
101     @rm -f ${GPOBJS) ${GPXINTOBJS}
102    
103     gpamela_deb.exe: FFLAGS = -fvxt -fno-automatic -Wno-globals ${DEBFLAGS} -I${GPINC} -I${GEANTINC} ${BATCHFLAGS}
104 pamela 3.3 gpamela_deb.exe: createdir ${GPLIBDIR}/libgarfield-7.a ${GPSRCS} ${GPOBJS} ${GPDEPENDS} ${GPMAINSRCS} ${GPMAINOBJS} ${GPMAINDEPENDS}
105 cafagna 3.1 @echo Creating $@ .....
106 pamela 3.3 $(FC) -o ${BIN}/$@ ${GPOBJS} ${GPMAINOBJS} ${LDFLAGS}
107 cafagna 3.1 @echo Removing object files .....
108 pamela 3.3 @rm -f ${GPOBJS) ${GPMAINOBJS}
109 cafagna 3.1
110     depend: ${GPXINTDEPENDS} ${GPMAINDEPENDS} ${GPDEPENDS}
111    
112     %.d: %.F
113     @echo Creating $@ from $< ;
114     @$(SHELL) -ec '$(FC) -M $(FFLAGS) $< \
115     | sed '\''s/\($(*F)\)\.o[ :]*/ $(*D)\/\1.o $(*D)\/$(*F)\.d : /g'\'' > $@; \
116     [ -s $@ ] || rm -f $@'
117    
118 cafagna 3.5 .PHONY: distclean clean createdir install
119 cafagna 3.1 # Move binaries from the local repository to the official repositories
120     install :
121     @test -d "$(GPAMELA_BIN)" && \
122     (echo "Now moving executable and auxiliary files to $(GPAMELA_BIN)"; \
123     mv -f $(BIN)/*.exe $(GPAMELA_BIN)/. ; cp -f ${AUXFILES} $(GPAMELA_BIN)/. )
124    
125     ${GPLIBDIR}/libgarfield-7.a:
126     @echo Creating libgarfield-7.a it will take few minutes .....
127     @cd ${GARFIELDSRC}; make -f makefile_linux libgarfield-7.a
128     @test -d "${GPLIBDIR}" || (echo "Creating ${GPLIBDIR}"; mkdir ${GPLIBDIR})
129     @echo Copyng $(@F) to ${GPLIBDIR}
130     @cp ${GARFIELDSRC}/$(@F) ${GPLIBDIR}
131    
132     # Create binary local repository if non existent
133     createdir :
134     @test -d "${BIN}" || (echo "Creating ${BIN}"; mkdir ${BIN})
135    
136     distclean: clean
137     @echo Removing garfield sources, objects and libraries
138     @cd ${GARFIELDSRC}; rm -f *.f *.o libgarfield-7.a
139     @rm -f ${GPLIBDIR}/libgarfield-7.a
140     @rm -fr ${GPLIBDIR}
141     @echo Removing executables .....
142     @rm -fr ${BIN}
143    
144    
145    
146     clean:
147     @echo Removing object files .....
148     @rm -f ${GPOBJS} ${GPMAINOBJS} ${GPXINTOBJS}
149     @echo Removing dependencies files .....
150     @rm -f ${GPDEPENDS} ${GPMAINDEPENDS} ${GPXINTDEPENDS}
151    
152     include ${GPDEPENDS}
153    
154    

  ViewVC Help
Powered by ViewVC 1.1.23