ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/BOSS/BossPython/Makefile.in
Revision: 1.3
Committed: Thu Mar 23 16:08:56 2006 UTC (19 years, 1 month ago) by yzhang
Branch: MAIN
CVS Tags: BOSS_v4_0_0-pre2
Changes since 1.2: +15 -22 lines
Log Message:
working python protoype from Stuart, but need copy /afs/cern.ch/user/s/swakef/scratch0/BOSS/SirDB/src/Makefile.in into SirDB/src/ to let python libraries working

File Contents

# User Rev Content
1 gcodispo 1.1 #
2     # Make file valid only on linux
3     #
4    
5     #####################################
6    
7     # find out in which directory we are
8 yzhang 1.3 TOPDIR = $(BOSSDIR)
9 gcodispo 1.1 SRCDIR = .
10 yzhang 1.2 INCLUDEDIR = ../include
11 yzhang 1.3 COREINCLUDEDIR = $(TOPDIR)/BossCore/include
12     CLIENTINCDIR = $(TOPDIR)/BossClient/include
13 gcodispo 1.1 LIBDIR = $(TOPDIR)/lib
14     BINDIR = $(TOPDIR)/bin
15     OSUDIR = $(TOPDIR)/OSUtils
16     OSUINC = $(OSUDIR)/include
17     CLADDIR = $(TOPDIR)/ClassAdLite
18     CLADINC = $(CLADDIR)/include
19 yzhang 1.3 DBDIR = $(TOPDIR)/SirDB
20     DBINC = $(DBDIR)/include
21 gcodispo 1.1
22 yzhang 1.2 CLIENTDIR = $(TOPDIR)/BossClient
23     CLIENTINC = $(CLIENTDIR)/include
24    
25     MLDIR = @monalisa_dir@
26     MLINC = @monalisa_inc@
27     MLLIB = @monalisa_lib@
28    
29 gcodispo 1.1 XMLINC = `xml2-config --cflags`
30     XMLLIB = `xml2-config --libs`
31     XSLTINC = `xslt-config --cflags`
32 yzhang 1.2 XSLTLIB = `xslt-config --libs`
33 gcodispo 1.1
34     PYTHONINC:=`python -c 'from distutils import sysconfig; print sysconfig.get_python_inc()'`
35    
36 yzhang 1.2
37 gcodispo 1.1 # defines the include path
38 yzhang 1.3 INCLUDES += -DLOGL1 -DLOGL2 -DLOGL3 -I$(CLIENTINCDIR) -I$(COREINCLUDEDIR) -I$(OSUINC) -I$(CLADINC) -I$(DBINC) -I$(CLIENTINC) -I$(MLINC) $(XMLINC) $(XSLTINC) -I$(DBINC)
39 gcodispo 1.1
40     # define the compiler
41 yzhang 1.2 CXX = c++
42 gcodispo 1.1 AR = ar
43    
44     # define compilation flags to
45 yzhang 1.3 CXXFLAGS = -Wall $(INCLUDES) -rdynamic -export-dynamic
46 gcodispo 1.1
47     #define the program to use to make archive library (c++ does it)
48     MKARLIB = $(AR) r
49    
50     # define the program used to build dependencies (again gnu c++ -M(M) -MG)
51     DEPEND = $(CXX) -M -MG
52    
53     # define the loader, and the loading flags
54     LD = $(CXX)
55    
56 yzhang 1.3 # define library search paths
57     LIB_DIR = -L$(LIBDIR) -L$(MLLIB) -rdynamic -export-dynamic
58 gcodispo 1.1
59     # define the library to build
60 yzhang 1.2 #COMMLIB = $(LIBDIR)/libBossComm.a
61 gcodispo 1.1
62     # define sources to be all file with extention .cc
63    
64 yzhang 1.2 BASEOBJS:= $(wildcard $(CLIENTDIR)/src/*.o)
65 gcodispo 1.1
66 yzhang 1.2 # executables
67     TARGET = BossUserSession
68 gcodispo 1.1
69     #####################################
70    
71     # define our libraries
72    
73     # build the option for the loader (essentially the list of libraries)
74 yzhang 1.3 LDFLAGS = $(LIBDIR)/libBossBase.a $(LIBDIR)/libBossBase.a -lClassAdLite -lOSUtils $(XMLLIB) $(XSLTLIB) -lapmoncpp
75 yzhang 1.2
76 gcodispo 1.1 #________________________________________________________________
77     # R U L E S
78     #________________________________________________________________
79    
80 yzhang 1.2
81     # build static libraries out of all objects
82    
83     # compile a .cc
84    
85     #---------------------------------------
86    
87     # creates dependencies file
88    
89     # include dependences
90    
91     #include $(SOURCES:.cc=.d)
92    
93     ######
94    
95 gcodispo 1.1 # default is build shared library for a particular package
96     all: build
97    
98 yzhang 1.2 #requires swig version 1.3.x or higher (tested with 1.3.19 and 1.3.21)
99     #to be run before release - removes swig requirement from users machine
100 gcodispo 1.1 generate:
101 yzhang 1.2 swig -python -c++ -I$(INCLUDES) $(TARGET).i
102 gcodispo 1.1
103 yzhang 1.2 #compiles C++ and python bindings
104 gcodispo 1.1 build:
105 yzhang 1.3 ${CXX} $(CXXFLAGS) -c $(TARGET)_wrap.cxx -I$(PYTHONINC)
106     ${LD} -shared $(BASEOBJS) $(LDFLAGS) $(LIB_DIR) $(TARGET)_wrap.o -o _$(TARGET).so
107 yzhang 1.2 rm -f $(TARGET)_wrap.o
108    
109     #do both - only use if swig v1.3.x is installed
110     full: generate build
111 gcodispo 1.1
112    
113     # clean file left by emacs...
114     rmold:
115     @ rm -f *~
116    
117 yzhang 1.2 clean: rmold
118 yzhang 1.3 rm -f *.o; rm -f *.d; rm -f *.so; rm -f $(TARGET).pyc
119 gcodispo 1.1
120 yzhang 1.3 veryclean: clean
121     rm -f $(TARGET).py* $(TARGET)_wrap.cxx
122 gcodispo 1.1