/[ascend]/trunk/models/johnpye/extfn/Makefile
ViewVC logotype

Diff of /trunk/models/johnpye/extfn/Makefile

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

revision 380 by johnpye, Wed Mar 15 12:48:03 2006 UTC revision 381 by johnpye, Sun Mar 19 23:01:39 2006 UTC
# Line 1  Line 1 
1  # Makefile for add-ins in the current directory; for each .c file you will get a separate .so file.  # Makefile for add-ins in the current directory; for each .c file you will get a separate .so file.
2    
3  PACKAGES = extfntest  PACKAGES = extfntest
 SO_SUF = .so  
 SO_PREF = lib  
4    
5  ASCEND_BASE_REL = ../../..  ASCEND_BASE_REL = ../../..
6    
# Line 12  ASCEND_INCDIR = $(ASCEND_BASE)/base/gene Line 10  ASCEND_INCDIR = $(ASCEND_BASE)/base/gene
10    
11  LIBS = $(PACKAGES:%=$(SO_PREF)%$(SO_SUF))  LIBS = $(PACKAGES:%=$(SO_PREF)%$(SO_SUF))
12    
13    ifeq ($(OSTYPE),msys)
14        PYTHON_VERSION := 24
15        PYTHON_ROOT := /c/Python$(PYTHON_VERSION)
16        PYTHON_CPPFLAGS := -I$(PYTHON_ROOT)/include
17        PYTHON_LDFLAGS := -L$(PYTHON_ROOT)/libs -lpython$(PYTHON_VERSION)
18        SO_SUF = .dll
19        SO_PREF =
20    else
21        ifeq ($(TERM),cygwin)
22            PYTHON_VERSION := 24
23            PYTHON_ROOT := /cygdrive/c/Python$(PYTHON_VERSION)
24            PYTHON_CPPFLAGS := -I$(PYTHON_ROOT)/include
25            PYTHON_LDFLAGS := -L$(PYTHON_ROOT)/libs -lpython24
26            SO_SUF = .dll
27            SO_PREF =
28        else
29            PYTHON_VERSION := $(shell python -V 2>&1 | sed s/Python\ // | sed s/^\\\([0-9][0-9]*\\.[0-9][0-9]*\\\).*/\\1/ )
30            PYTHON_CPPFLAGS := -I/usr/include/python$(PYTHON_VERSION)
31            PYTHON_LDFLAGS := -lpython$(PYTHON_VERSION)
32            SO_SUF = .so
33            SO_PREF = lib
34        endif
35    endif
36    
37  all: ascend makelibs test  all: ascend makelibs test
38    
39  makelibs: $(LIBS)  makelibs: $(LIBS)
40      @echo "Compiled libraries $(LIBS)"      @echo "Compiled libraries $(LIBS)"
41    
42  test: $(LIBS)  test: $(LIBS)
43      PYTHONPATH=$(ASCEND_BASE)/pygtk/interface/ python extfntest.py      PYTHONPATH=$(ASCEND_BASE)/pygtk/interface/ $(PYTHON_ROOT)/python extfntest.py
44    
45  ascend:  ascend:
46      make -j2 -C $(ASCEND_BASE)/pygtk/interface/      make -j2 -C $(ASCEND_BASE)/pygtk/interface/

Legend:
Removed from v.380  
changed lines
  Added in v.381

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