/[ascend]/trunk/pygtk/interface/Makefile
ViewVC logotype

Diff of /trunk/pygtk/interface/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 314 by johnpye, Thu Feb 23 03:48:56 2006 UTC revision 315 by johnpye, Thu Feb 23 07:40:47 2006 UTC
# Line 120  main: main.o $(OBJS) $(ASC_LIBS) Line 120  main: main.o $(OBJS) $(ASC_LIBS)
120  #------------------------  #------------------------
121  # SWIG targets  # SWIG targets
122    
123    
124  SWIG_MODULE = ascend  SWIG_MODULE = ascend
125  SWIG = swig  SWIG = swig
126    
# Line 128  ifeq ($(OSTYPE),msys) Line 129  ifeq ($(OSTYPE),msys)
129      SWIG_INCROOT = /usr/local/share/swig/$(SWIG_VERSION)      SWIG_INCROOT = /usr/local/share/swig/$(SWIG_VERSION)
130      SWIG_INCLUDES = -I$(SWIG_INCROOT) -I$(SWIG_INCROOT)/std -I$(SWIG_INCROOT)/python      SWIG_INCLUDES = -I$(SWIG_INCROOT) -I$(SWIG_INCROOT)/std -I$(SWIG_INCROOT)/python
131  else  else
132        SWIG_VERSION = $(shell $(SWIG) -version | grep "^SWIG Version " | sed s/SWIG\ Version\ \\\([0-9][0-9]*\\\(\\.[0-9][0-9]*\\\)*\\\).*/\\1/)
133      SWIG_INCLUDES =      SWIG_INCLUDES =
134  endif  endif
135    
136    # optimize for SWIG 1.3.28 and newer
137    SWIG_MAJOR = $(shell echo $(SWIG_VERSION) | sed s/^\\\([0-9]*\\\).*/\\1/)
138    SWIG_MINOR = $(shell echo $(SWIG_VERSION) | sed s/^[0-9]*\\.\\\([0-9]*\\\).*/\\1/)
139    SWIG_PATCH = $(shell echo $(SWIG_VERSION) | sed s/^[0-9]*\\.[0-9]*\\.\\\([0-9]*\\\).*/\\1/)
140    
141    SWIG_FEATURES =
142    ifeq ($(SWIG_MAJOR),1)
143        ifeq ($(SWIG_MINOR),3)
144            ifeq ($(shell test $(SWIG_PATCH) -ge 28 && echo 1),1)
145                SWIG_FEATURES="-O"
146            endif
147        endif
148    endif
149    
150  SWIGFLAGS = -c++ -python $(SWIG_INCLUDES)  SWIGFLAGS = -c++ -python $(SWIG_INCLUDES)
151  SWIG_CFLAGS = -c -fPIC  SWIG_CFLAGS = -c -fPIC
152  SWIG_CPPFLAGS = $(ASCXX_CPPFLAGS) $(PLATFORM_CPPFLAGS)  SWIG_CPPFLAGS = $(ASCXX_CPPFLAGS) $(PLATFORM_CPPFLAGS)
153    
154  SWIG_OBJS = $(SWIG_MODULE:%=%_wrap.o)  SWIG_OBJS = $(SWIG_MODULE:%=%_wrap.o)
155    SWIG_PY = $(SWIG_MODULE:%=%.py)
156    
157  LIB = _ascend$(SO_SUFF)  LIB = _ascend$(SO_SUFF)
158    
# Line 145  SWIGS = plot.i solver.i Line 162  SWIGS = plot.i solver.i
162    
163  # FIXME add ' $(ASC_LIBS)' to deps once Jam build is fixed:  # FIXME add ' $(ASC_LIBS)' to deps once Jam build is fixed:
164  %_wrap.cxx %.py: %.i $(SWIGS) $(HDRS)  %_wrap.cxx %.py: %.i $(SWIGS) $(HDRS)
165      $(SWIG) $(SWIGFLAGS) $<      SWIG_FEATURES=$(SWIG_FEATURES) $(SWIG) $(SWIGFLAGS) $<
166    
167  .precious: $(SWIG_MODULE:%=%_wrap.cxx)  .precious: $(SWIG_MODULE:%=%_wrap.cxx)
168  .precious: _ascend.so  .precious: _ascend.so
# Line 153  SWIGS = plot.i solver.i Line 170  SWIGS = plot.i solver.i
170  %_wrap.o: %_wrap.cxx  %_wrap.o: %_wrap.cxx
171      $(CC) $(SWIG_CFLAGS) -o $@ $^ $(SWIG_CPPFLAGS)      $(CC) $(SWIG_CFLAGS) -o $@ $^ $(SWIG_CPPFLAGS)
172    
173  $(LIB): $(ASC_LIBS) $(OBJS) $(SWIG_OBJS)  $(LIB): $(ASC_LIBS) $(OBJS) $(SWIG_OBJS) $(SWIG_PY)
174      $(LD) -module -shared -o $@ $^ $(LDFLAGS) $(ASCXX_PYTHON_LDFLAGS)      $(LD) -module -shared -o $@ $(ASC_LIBS) $(OBJS) $(SWIG_OBJS) $(LDFLAGS) $(ASCXX_PYTHON_LDFLAGS)
175    
176  #------------------------  #------------------------
177  # Trying to debug this GDPITA '3' problem, bug #178  # Trying to debug this GDPITA '3' problem, bug #178

Legend:
Removed from v.314  
changed lines
  Added in v.315

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22