ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/BOSS/BossPython/Makefile.in
Revision: 1.21
Committed: Fri Jan 12 09:33:11 2007 UTC (18 years, 3 months ago) by gcodispo
Branch: MAIN
Changes since 1.20: +2 -2 lines
Log Message:
Cleaned linking options

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.21 CXXFLAGS = @CXXFLAGS@ $(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.21 LD = $(CXX) -shared -Wl,-E $(CXXFLAGS)
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 gcodispo 1.20 #BASEOBJS:= $(wildcard $(CLIENTDIR)/src/*.o)
62     # define sources to be oly needed ones
63     BASEOBJS:= $(CLIENTDIR)/src/BossAdministratorSession.o $(CLIENTDIR)/src/BossCoreFunctions.o $(CLIENTDIR)/src/BossDatabase.o $(CLIENTDIR)/src/BossDeclaration.o $(CLIENTDIR)/src/BossProgramType.o $(CLIENTDIR)/src/BossRTMon.o $(CLIENTDIR)/src/BossScheduler.o $(CLIENTDIR)/src/BossSession.o $(CLIENTDIR)/src/BossTask.o $(CLIENTDIR)/src/XMLDoc.o
64 gcodispo 1.1
65 yzhang 1.2 # executables
66 yzhang 1.18 TARGET = BossSession
67 gcodispo 1.1 #####################################
68    
69     # define our libraries
70    
71     # build the option for the loader (essentially the list of libraries)
72 gcodispo 1.19 LDFLAGS = -L$(LIBDIR) -lBossBase -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 gcodispo 1.1
101 yzhang 1.2 #compiles C++ and python bindings
102 gcodispo 1.1 build:
103 yzhang 1.3 ${CXX} $(CXXFLAGS) -c $(TARGET)_wrap.cxx -I$(PYTHONINC)
104 gcodispo 1.10 ${LD} $(BASEOBJS) $(LDFLAGS) $(LIB_DIR) $(TARGET)_wrap.o -o _$(TARGET).so
105 yzhang 1.2 rm -f $(TARGET)_wrap.o
106    
107     #do both - only use if swig v1.3.x is installed
108 swakef 1.4 full: @swig_generate@ build
109 gcodispo 1.1
110    
111     # clean file left by emacs...
112     rmold:
113     @ rm -f *~
114    
115 yzhang 1.2 clean: rmold
116 yzhang 1.3 rm -f *.o; rm -f *.d; rm -f *.so; rm -f $(TARGET).pyc
117 gcodispo 1.1
118 swakef 1.9 veryclean: clean
119 yzhang 1.3 rm -f $(TARGET).py* $(TARGET)_wrap.cxx
120 gcodispo 1.1