-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.in
104 lines (87 loc) · 3.89 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
srcdir := @srcdir@
duktape_dir := $(srcdir)/vendor/duktape/
CC := @CC@
AR := @AR@
RANLIB := @RANLIB@
CFLAGS := @CFLAGS@ @SHOBJFLAGS@
CPPFLAGS := -I. -I$(srcdir) -I$(duktape_dir) @CPPFLAGS@ @SHOBJCPPFLAGS@ @DEFS@ @TCL_DEFS@
LDFLAGS := @LDFLAGS@
LIBS := @LIBS@
SHOBJLDFLAGS := @SHOBJLDFLAGS@
VPATH := $(srcdir)
prefix := @prefix@
exec_prefix := @exec_prefix@
libdir := @libdir@
TCL_DUKTAPE_AMALGAMATION := @TCL_DUKTAPE_AMALGAMATION@
PACKAGE_VERSION := @PACKAGE_VERSION@
TCL_PACKAGE_PATH := @TCL_PACKAGE_PATH@
PACKAGE_INSTALL_DIR := $(TCL_PACKAGE_PATH)/tclduktape-$(PACKAGE_VERSION)
INSTALL := @INSTALL@
INSTALL_PROGRAM := @INSTALL_PROGRAM@
INSTALL_DATA := @INSTALL_DATA@
export CC CFLAGS CPPFLAGS
all: @EXTENSION_TARGET@ pkgIndex.tcl
ifneq ($(TCL_DUKTAPE_AMALGAMATION),1)
TCL_DUKTAPE_OBJECTS = duktape.o tcl-duktape.o
else
TCL_DUKTAPE_OBJECTS = tcl-duktape-amalgamation.o
endif
ifeq (@TCLEXT_BUILD@,shared)
@EXTENSION_TARGET@: $(TCL_DUKTAPE_OBJECTS) Makefile
rm -f @EXTENSION_TARGET@
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJLDFLAGS) -o @EXTENSION_TARGET@ $(TCL_DUKTAPE_OBJECTS) $(LIBS)
-@WEAKENSYMS@ @EXTENSION_TARGET@
-@REMOVESYMS@ @EXTENSION_TARGET@
else
@EXTENSION_TARGET@: $(TCL_DUKTAPE_OBJECTS) Makefile
rm -f @EXTENSION_TARGET@
$(AR) rc @EXTENSION_TARGET@ $(TCL_DUKTAPE_OBJECTS)
-$(RANLIB) @EXTENSION_TARGET@
endif
# The amalgamation is used when compiling statically so that the same ABI can be exposed
# to upstream projects rather than requiring them to filter out our symbols
tcl-duktape-amalgamation.c: $(srcdir)/lib/tcl-duktape.c $(duktape_dir)duktape.c Makefile
rm -f tcl-duktape-amalgamation.c
cat $(duktape_dir)duktape.c $(srcdir)/lib/tcl-duktape.c > tcl-duktape-amalgamation.c.new
mv tcl-duktape-amalgamation.c.new tcl-duktape-amalgamation.c
tcl-duktape-amalgamation.o: tcl-duktape-amalgamation.c $(duktape_dir)duktape.h $(duktape_dir)duk_config.h Makefile
$(CC) $(CPPFLAGS) -DTCL_DUKTAPE_AMALGAMATION=1 $(CFLAGS) -o tcl-duktape-amalgamation.o -c tcl-duktape-amalgamation.c
ifneq (@TCLEXT_BUILD@,shared)
-@WEAKENSYMS@ tcl-duktape-amalgamation.o
-@REMOVESYMS@ tcl-duktape-amalgamation.o
endif
tcl-duktape.o: $(srcdir)/lib/tcl-duktape.c $(duktape_dir)duktape.h $(duktape_dir)duk_config.h Makefile
$(CC) $(CPPFLAGS) $(CFLAGS) -o tcl-duktape.o -c $(srcdir)/lib/tcl-duktape.c
duktape.o: $(duktape_dir)duktape.c $(duktape_dir)duktape.h $(duktape_dir)duk_config.h Makefile
$(CC) $(CPPFLAGS) $(CFLAGS) -o duktape.o -c $(duktape_dir)duktape.c
utils.tcl: $(srcdir)/lib/utils.tcl
rm -f utils.tcl
@LN_S@ $(srcdir)/lib/utils.tcl .
oo.tcl: $(srcdir)/lib/oo.tcl
rm -f oo.tcl
@LN_S@ $(srcdir)/lib/oo.tcl .
test: @EXTENSION_TARGET@ $(srcdir)/tests.tcl utils.tcl oo.tcl pkgIndex.tcl
$(srcdir)/tests.tcl
install: @EXTENSION_TARGET@ pkgIndex.tcl $(srcdir)/lib/utils.tcl $(srcdir)/lib/oo.tcl
$(INSTALL) -d '$(DESTDIR)$(PACKAGE_INSTALL_DIR)'
$(INSTALL_PROGRAM) @EXTENSION_TARGET@ '$(DESTDIR)$(PACKAGE_INSTALL_DIR)'
$(INSTALL_DATA) pkgIndex.tcl $(srcdir)/lib/oo.tcl $(srcdir)/lib/utils.tcl '$(DESTDIR)$(PACKAGE_INSTALL_DIR)'
uninstall:
rm -f '$(DESTDIR)$(PACKAGE_INSTALL_DIR)/@EXTENSION_TARGET@'
rm -f '$(DESTDIR)$(PACKAGE_INSTALL_DIR)/pkgIndex.tcl'
rm -f '$(DESTDIR)$(PACKAGE_INSTALL_DIR)/oo.tcl'
rm -f '$(DESTDIR)$(PACKAGE_INSTALL_DIR)/utils.tcl'
rmdir '$(DESTDIR)$(PACKAGE_INSTALL_DIR)'
clean:
rm -f @EXTENSION_TARGET@ tcl-duktape.o duktape.o
rm -f tcl-duktape-amalgamation.c tcl-duktape-amalgamationc.new
rm -f tcl-duktape-amalgamation.o
rm -f utils.tcl oo.tcl
distclean: clean
rm -f Makefile libtclduktape.syms
rm -f pkgIndex.tcl
rm -f config.log config.status
mrproper: distclean
rm -f $(srcdir)/configure $(srcdir)/aclocal.m4 $(srcdir)/config.guess $(srcdir)/config.sub $(srcdir)/install-sh
rm -f $(srcdir)/libtclduktape.vers
.PHONY: all test install uninstall clean distclean mrproper