ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/BOSS/BossPython/Makefile.in
Revision: 1.17
Committed: Mon Jun 12 14:37:24 2006 UTC (18 years, 10 months ago) by gcodispo
Branch: MAIN
CVS Tags: BOSS_4_1_3, BOSS_4_1_2
Changes since 1.16: +2 -2 lines
Log Message:
Fixed bug I introduced adding linking options in swig generation

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