> Since the makefiles for RootApps such as Event and, FastMC, etc. only have
> make file options for SunOS, and AIX, what modifications can I make to get
> it to work for Linux? Thank you for your time. Peace.
You can get these "options" looking into the .../root/src/Makefile.* for
the appropriate platform.
Another solution is : you need to download the appropriate binary release
of root ( for your platform ) and then look into .../root/test/Makefile
which contains "options" used in this release on your platform.
You can also prepare a multi-platform Makefile ( the gnu make is required,
but it's anyhow required to compile root, I think ).
Have a look at the attachment which is a dual-platform Makefile for Linux
and AIX ( note - the "options" are not current, you need to modify them ).
The main difference between AIX and other unix systems is the way a shared
library is built ( see how the H309SO is built in the attached Makefile ).
Jacek.
SrcSuf = cxx
IncSuf = hxx
ObjSuf = o
ExeSuf =
DllSuf = so
OutPutOpt = -o
ROOTLIBS = -L$(ROOTSYS)/lib -lNew -lBase -lCint -lClib -lCont -lFunc \
-lGraf -lGraf3d -lHist -lHtml -lMatrix -lMeta -lMinuit -lNet \
-lPhysics -lPostscript -lProof -lTree -lUnix -lZip
ROOTGLIBS = -lGpad -lGui -lGX11 -lX3d
OSNAME = $(shell uname)
ifeq ($(OSNAME),Linux)
# Linux with egcs
EGCS = /opt/egcs/pro
CXX = g++
CXXFLAGS = -g -O2 -Wall -fno-rtti -fno-exceptions -fPIC -I$(ROOTSYS)/include
LD = g++
LDFLAGS = -g -O2 -Wl,-rpath,$(EGCS)/lib:$(ROOTSYS)/lib
SOFLAGS = -shared
#SOFLAGS = -Wl,-soname,h309.$(DllSuf) -shared
LIBS = $(ROOTLIBS) -lm -ldl -rdynamic
GLIBS = $(ROOTLIBS) $(ROOTGLIBS) -L/usr/X11R6/lib \
-lXpm -lX11 -lm -ldl -rdynamic
endif
ifeq ($(OSNAME),AIX)
# IBM AIX
CXX = xlC
CXXFLAGS = -O2 -w -qnoro -qnoroconst -qmaxmem=-1 -I$(ROOTSYS)/include
LD = xlC
LDFLAGS = -O2
SOFLAGS =
ROOTLIBS = -L$(ROOTSYS)/lib -lRoot -lCint
LIBS = $(ROOTLIBS) -lm -lcurses
GLIBS = $(ROOTLIBS) -lXm -lXt -lX11 -lm -lPW -lld -lcurses
endif
#------------------------------------------------------------------------------
H309O = h309.$(ObjSuf) h309Dict.$(ObjSuf)
H309S = h309.$(SrcSuf) h309Dict.$(SrcSuf)
H309SO = h309.$(DllSuf)
OBJS = $(H309O)
PROGRAMS = $(H309SO)
all: $(PROGRAMS)
$(H309SO): $(H309O)
ifeq ($(OSNAME),Linux)
$(LD) $(SOFLAGS) $(LDFLAGS) $(H309O) $(OutPutOpt) $(H309SO)
endif
ifeq ($(OSNAME),AIX)
/usr/lpp/xlC/bin/makeC++SharedLib $(OutPutOpt) $(H309SO) $(LIBS) -p 0 $(H309O)
endif
@echo "$(H309SO) for $(OSNAME) done"
clean:
@rm -f $(OBJS) *Dict.* *~ .*~ core
.SUFFIXES: .$(SrcSuf)
###
h309.$(ObjSuf): h309.$(SrcSuf) h309.$(IncSuf)
h309Dict.$(SrcSuf): h309.$(IncSuf)
@echo "Generating dictionary h309Dict..."
@$(ROOTSYS)/bin/rootcint -f h309Dict.$(SrcSuf) -c h309.$(IncSuf)
.$(SrcSuf).$(ObjSuf):
$(CXX) $(CXXFLAGS) -c $<
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:34 MET