]>
Commit | Line | Data |
---|---|---|
c90f71dd RD |
1 | # Generated automatically from Makefile.in by configure. |
2 | # Makefile for producing SWIG runtime libraries. | |
3 | # | |
4 | # The SWIG runtime library consists of the pointer-type checker | |
5 | # and other support functions. Multi-file SWIG modules | |
6 | # generally link with these libraries. | |
7 | # | |
8 | # By default, the installation processs will attempt to | |
9 | # build shared libraries. If that doesn't work, a static | |
10 | # library is built instead. | |
11 | ||
12 | prefix = /usr/local | |
13 | exec_prefix = ${prefix} | |
eb28fd47 | 14 | CC = cc |
c90f71dd RD |
15 | AR = ar |
16 | RANLIB = ranlib | |
17 | SO = .so | |
eb28fd47 RD |
18 | CCSHARED = |
19 | LDSHARED = ld | |
c90f71dd RD |
20 | DYN_LIBS = libswigtcl8$(SO) libswigtcl$(SO) libswigpl$(SO) libswigpy$(SO) |
21 | STATIC_LIBS = libswigtcl8.a libswigtcl.a libswigpl.a libswigpy.a | |
22 | LIBS = $(STATIC_LIBS) $(DYN_LIBS) | |
23 | LIB_DIR = $(exec_prefix)/lib | |
24 | ||
25 | INSTALL_DATA = ../install-sh -c -m 644 | |
26 | INSTALL_SHLB = ../install-sh -c -m 555 | |
27 | ||
28 | all: | |
29 | @sh make.sh | |
30 | ||
31 | ||
32 | install: | |
33 | @echo "Installing runtime libraries" | |
34 | @for i in $(STATIC_LIBS); \ | |
35 | do \ | |
36 | if [ -f $$i ]; then \ | |
37 | echo "Installing $$i in $(LIB_DIR)/$$i"; \ | |
38 | $(INSTALL_DATA) $$i $(LIB_DIR)/$$i; \ | |
39 | fi; \ | |
40 | done; | |
41 | @for i in $(DYN_LIBS); \ | |
42 | do \ | |
43 | if [ -f $$i ]; then \ | |
44 | echo "Installing $$i in $(LIB_DIR)/$$i"; \ | |
45 | $(INSTALL_SHLB) $$i $(LIB_DIR)/$$i; \ | |
46 | fi; \ | |
47 | done; | |
48 | ||
49 | ||
50 | clean:: | |
51 | rm -rf *.o *.a *$(SO) *.c *.swg *~ core | |
52 | ||
53 | # ---------------------------------------------------------------------- | |
54 | # Tcl runtime library | |
55 | # ---------------------------------------------------------------------- | |
56 | ||
eb28fd47 | 57 | TCL_INCLUDE = -I/usr/local/include |
c90f71dd RD |
58 | TCL_LIB = -L/usr/local/lib |
59 | ||
60 | # Tcl 7.x shared | |
61 | ||
62 | tcl_shared: | |
63 | ../swig -tcl -co -o libtcl.c -I../swig_lib swigtcl.swg | |
64 | $(CC) $(CCSHARED) -c -DSWIG_GLOBAL libtcl.c | |
65 | $(LDSHARED) libtcl.o -o libswigtcl$(SO) | |
66 | ||
67 | # Tcl 7.x library | |
68 | ||
69 | tcl_lib: | |
70 | ../swig -tcl -co -o libtcl.c -I../swig_lib swigtcl.swg | |
71 | $(CC) -c -DSWIG_GLOBAL libtcl.c | |
72 | $(AR) cr libswigtcl.a libtcl.o | |
73 | ||
74 | # Tcl 8.x shared | |
75 | ||
76 | tcl8_shared: | |
77 | ../swig -tcl -co -o libtcl8.c -I../swig_lib swigtcl8.swg | |
78 | $(CC) $(CCSHARED) -c -DSWIG_GLOBAL $(TCL_INCLUDE) libtcl8.c | |
79 | $(LDSHARED) libtcl8.o -o libswigtcl8$(SO) | |
80 | ||
81 | tcl8_lib: | |
82 | ../swig -tcl -co -o libtcl8.c -I../swig_lib swigtcl8.swg | |
83 | $(CC) -c -DSWIG_GLOBAL $(TCL_INCLUDE) libtcl8.c | |
84 | $(AR) cr libswigtcl8.a libtcl8.o | |
85 | ||
86 | # ---------------------------------------------------------------------- | |
87 | # Python run-time library | |
88 | # ---------------------------------------------------------------------- | |
89 | ||
002b1ea6 RD |
90 | PYTHON_INCLUDE= -DHAVE_CONFIG_H -I/usr/local/include/Py -I/usr/local/lib/python/lib |
91 | PYTHON_LIB = /usr/local/lib/python/lib | |
c90f71dd RD |
92 | |
93 | # Python shared | |
94 | ||
95 | py_shared: | |
96 | ../swig -python -co -o libpy.c -I../swig_lib python.swg | |
97 | $(CC) $(CCSHARED) -c -DSWIG_RUNTIME -DSWIG_GLOBAL $(PYTHON_INCLUDE) libpy.c | |
98 | $(LDSHARED) libpy.o -o libswigpy$(SO) | |
99 | ||
100 | # Python library | |
101 | ||
102 | py_lib: | |
103 | ../swig -python -co -o libpy.c -I../swig_lib python.swg | |
104 | $(CC) -c -DSWIG_RUNTIME -DSWIG_GLOBAL $(PYTHON_INCLUDE) libpy.c | |
105 | $(AR) cr libswigpy.a libpy.o | |
106 | ||
107 | # ---------------------------------------------------------------------- | |
108 | # Perl run-time library | |
109 | # ---------------------------------------------------------------------- | |
110 | ||
eb28fd47 | 111 | PERL5_INCLUDE= -I/System/Library/Perl/darwin/CORE |
c90f71dd RD |
112 | |
113 | # Perl shared | |
114 | ||
115 | perl_shared: | |
116 | rm -f libperl.c libperl.swg | |
117 | ../swig -perl5 -co -o libperl.swg -I../swig_lib perl5.swg | |
118 | cat perlrun.h >> libperl.c | |
119 | cat libperl.swg >> libperl.c | |
120 | $(CC) $(CCSHARED) -c -Dexplicit= -Dbool=char -DSWIG_GLOBAL $(PERL5_INCLUDE) libperl.c | |
121 | $(LDSHARED) libperl.o -o libswigpl$(SO) | |
122 | ||
123 | # Perl library | |
124 | ||
125 | perl_lib: | |
126 | rm -f libperl.c libperl.swg | |
127 | ../swig -perl5 -co -o libperl.swg -I../swig_lib perl5.swg | |
128 | cat perlrun.h >> libperl.c | |
129 | cat libperl.swg >> libperl.c | |
130 | $(CC) -c -Dexplicit= -Dbool=char -DSWIG_GLOBAL $(PERL5_INCLUDE) libperl.c | |
131 | $(AR) cr libswigpl.a libperl.o |