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

Contents of /trunk/models/johnpye/extfn/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 367 - (show annotations) (download)
Fri Mar 10 07:44:59 2006 UTC (19 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 # 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 ASCEND_BASE_REL = ../../..
8
9 ASCEND_BASE = $(shell cd $(ASCEND_BASE_REL) && pwd)
10
11 ASCEND_INCDIR = $(ASCEND_BASE)/base/generic
12
13 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 PYTHONPATH=$(ASCEND_BASE)/pygtk/interface/ python extfntest.py
22
23 ascend:
24 make -j2 -C $(ASCEND_BASE)/pygtk/interface/
25
26 CC = gcc
27
28 LD = libtool --mode=link $(CC) -module -shared
29
30 LDFLAGS = -lm
31
32 CPPFLAGS = -I$(ASCEND_INCDIR)
33 CFLAGS = -O -c
34
35 $(SO_PREF)%$(SO_SUF): %.o
36 $(LD) -o $@ $^ $(LDFLAGS)
37
38 %.lo: %.c
39 libtool --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) $^
40
41 clean:
42 -rm *.o *.so

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