chiark / gitweb /
update tcl version
[chiark-tcl.git] / base / extension.make
1 # base code for various Tcl extensions
2 # Copyright 2006-2012 Ian Jackson
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 2 of the
7 # License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this library; if not, see <http://www.gnu.org/licenses/>.
16
17
18
19 EXTPREFIX ?=    $(FAMILY)_
20 EXTENSION ?=    $(EXTPREFIX)$(EXTBASE)
21 SHLIB ?=        $(EXTENSION)-$(VERSION)
22 TABLE ?=        $(EXTBASE)
23
24 AUTO_HDRS +=    $(TABLE)+tcmdif.h
25 AUTO_SRCS +=    $(TABLE)+tcmdif.c
26 CFILES +=       $(TABLE)+tcmdif
27
28 CPPFLAGS += $(foreach o, $(OTHER_EXTS), -I../$(dir $o))
29 LDLIBS += $(foreach o, $(OTHER_EXTS), ../$(dir $o)$(EXTPREFIX)$(notdir $o)-$(VERSION).so)
30
31 LDLIBS +=       $(BASE_DIR)/$(BASE_SHLIB).so
32
33 include         $(BASE_DIR)/common.make
34 include         $(BASE_DIR)/shlib.make
35
36 TCMDIFARGS ?=   -p$(FAMILY)_$(EXTBASE) -o$@ $(BASE_TCT) $(OTHER_TCTS) $<
37
38 %+tcmdif.c:     %.tct $(BASE_TCT) $(OTHER_TCTS) $(TCMDIFGEN)
39                 $(TCMDIFGEN) -wc $(TCMDIFARGS)
40
41 %+tcmdif.h:     %.tct $(BASE_TCT) $(OTHER_TCTS) $(TCMDIFGEN)
42                 $(TCMDIFGEN) -wh $(TCMDIFARGS)
43
44 include         $(BASE_DIR)/final.make