ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/BOSS/BossPython/Makefile.in
Revision: 1.2
Committed: Thu Mar 23 09:33:53 2006 UTC (19 years, 1 month ago) by yzhang
Branch: MAIN
Changes since 1.1: +57 -27 lines
Log Message:
start python test

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