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

Annotation of /trunk/models/johnpye/extfn/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 367 - (hide annotations) (download)
Fri Mar 10 07:44:59 2006 UTC (16 years, 9 months ago) by johnpye
File size: 796 byte(s)
Trying to fix up johnpye/extfn/extfntest.c to work on Windows (MinGW)
(ie to fix linking problems).
1 johnpye 209 # Makefile for add-ins in the current directory; for each .c file you will get a separate .so file.
2    
3     PACKAGES = extfntest
4     SO_SUF = .so
5     SO_PREF = lib
6    
7 johnpye 367 ASCEND_BASE_REL = ../../..
8 johnpye 209
9 johnpye 367 ASCEND_BASE = $(shell cd $(ASCEND_BASE_REL) && pwd)
10    
11     ASCEND_INCDIR = $(ASCEND_BASE)/base/generic
12    
13 johnpye 209 LIBS = $(PACKAGES:%=$(SO_PREF)%$(SO_SUF))
14    
15     all: ascend makelibs test
16    
17     makelibs: $(LIBS)
18     @echo "Compiled libraries $(LIBS)"
19    
20     test: $(LIBS)
21 johnpye 367 PYTHONPATH=$(ASCEND_BASE)/pygtk/interface/ python extfntest.py
22 johnpye 209
23     ascend:
24 johnpye 367 make -j2 -C $(ASCEND_BASE)/pygtk/interface/
25 johnpye 209
26     CC = gcc
27    
28 johnpye 367 LD = libtool --mode=link $(CC) -module -shared
29 johnpye 209
30 johnpye 367 LDFLAGS = -lm
31 johnpye 209
32 johnpye 367 CPPFLAGS = -I$(ASCEND_INCDIR)
33 johnpye 209 CFLAGS = -O -c
34    
35     $(SO_PREF)%$(SO_SUF): %.o
36     $(LD) -o $@ $^ $(LDFLAGS)
37    
38 johnpye 367 %.lo: %.c
39     libtool --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) $^
40 johnpye 209
41     clean:
42     -rm *.o *.so

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