File: GNUmakefile.example.in

package info (click to toggle)
hepmc 2.06.09-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 11,524 kB
  • ctags: 1,521
  • sloc: sh: 9,138; cpp: 8,113; ansic: 682; makefile: 240; csh: 6; fortran: 4
file content (72 lines) | stat: -rw-r--r-- 1,991 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
################################################################################
# Makefile for building a HepMC PYTHIA8 example
#
# Lynn Garren garren@fnal.gov
#
# main31 and main32 have been copied from PYTHIA 8.157
# you must source either config.csh or config.sh first
#
# ./main31.exe
# ./main32.exe main32.cmnd hepmcout32.dat
#
################################################################################ Define directory paths 
#    You may have to change PYTHIA8_HOME and/or other variables
#
  HepMCdir      = @prefix@
  HEPMCLOCATION = $(HepMCdir)
  HepMClib      = -lHepMC
  Pythia_LIB	= -lpythia8 -lLHAPDF -lhepmcinterface

################################################################################ Compiler options
#
  CXX           = @CXX@
  INCLUDES 	= -I/usr/include/pythia8
  CXXFLAGS      =  @AM_CXXFLAGS@ @CXXFLAGS@ -Wshadow -fbounds-check $(INCLUDES)
ifeq "$(CXX)" "g++"
   FLAGS 	= $(DFLG) -fno-second-underscore $(INCDIR)
else
  FLAGS 	= $(DFLG) $(INCDIR)
endif

  LINK_LIBS     = @LDFLAGS@ 

UNAME = $(shell uname)
ifneq "$(UNAME)" "Darwin"
  LINK_LIBS     += -Wl,-rpath -Wl,$(HepMCdir)/lib
endif

  HDRS          = $(HepMCdir)/include/HepMC/*.h *.h
  EXAMPLES	=  main31.exe main32.exe

###############################################################################
#
.SUFFIXES:      .o .cc .exe

all:	$(EXAMPLES)

main31.exe: main31.o
	$(CXX) $(CXXFLAGS) -o $@ main31.o \
	$(Pythia_LIB) \
	$(HepMClib)

main32.exe: main32.o
	$(CXX) $(CXXFLAGS) -o $@ main32.o \
	$(Pythia_LIB) \
	$(HepMClib)

###############################################################################
#
.cc.o:         $(HDRS) $<
	$(CXX) $(CXXFLAGS) -c $< -o $@

###############################################################################
# gmake clean       removes all garbage from HepMC directories.
# gmake distclean       removes all compiled libraries, executables, +garbage
#
clean:
	rm -f *.o

distclean: 
	$(MAKE) clean --no-print-directory
	rm -f $(EXAMPLES)
	rm -f *.dat