Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / usbmodeswitch / jim / Makefile.in
blob0191c83fc998eeb80e9603c7362511388b61aa4d
1 # Tools
2 CC ?= @CCACHE@ @CC@
3 CXX = @CCACHE@ @CXX@
4 RANLIB = @RANLIB@
5 AR = @AR@
6 STRIP = @STRIP@
8 # Configuration
10 SH_CFLAGS ?= @SH_CFLAGS@
11 SH_LDFLAGS ?= @SH_LDFLAGS@
12 SHOBJ_CFLAGS ?= @SHOBJ_CFLAGS@
13 SHOBJ_LDFLAGS ?= @SHOBJ_LDFLAGS@
14 CFLAGS = @CFLAGS@
15 CXXFLAGS = @CXXFLAGS@
16 LDFLAGS = @LDFLAGS@
17 LDLIBS += @LDLIBS@
18 exec_prefix ?= @exec_prefix@
19 prefix ?= @prefix@
21 CC += -D_GNU_SOURCE -Wall $(OPTIM) -I.
22 CXX += -D_GNU_SOURCE -Wall $(OPTIM) -I.
23 @if srcdir != .
24 CFLAGS += -I@srcdir@
25 CXXFLAGS += -I@srcdir@
26 VPATH := @srcdir@
27 @endif
29 @if JIM_STATICLIB
30 LIBJIM := libjim.a
31 @else
32 LIBJIM := libjim.so
33 SH_LIBJIM := $(LIBJIM)
34 CC += $(SH_CFLAGS)
35 CXX += $(SH_CFLAGS)
36 DEF_LD_PATH := @LD_LIBRARY_PATH@=`pwd`
37 @endif
39 @if HAVE_CXX_EXTENSIONS
40 JIMSH_CC := $(CXX) $(CXXFLAGS)
41 @else
42 JIMSH_CC := $(CC) $(CFLAGS)
43 @endif
45 OBJS := _load-static-exts.o jim-subcmd.o jim-interactive.o jim-format.o jim.o utf8.o jimregexp.o \
46 @EXTRA_OBJS@ @C_EXT_OBJS@ @TCL_EXT_OBJS@
48 JIMSH := jimsh@EXEEXT@
50 all: $(JIMSH) @C_EXT_SHOBJS@
52 # Create C extensions from pure Tcl extensions
53 .SUFFIXES: .tcl
54 .tcl.o:
55 @tclsh@ @srcdir@/make-c-ext.tcl $< >_$*.c || ( rm _$*.c; exit 1)
56 $(CC) $(CFLAGS) -c -o $@ _$*.c || ( rm _$*.c; exit 1)
57 @rm -f _$*.c
59 docs: Tcl.html
61 $(JIMSH): $(LIBJIM) jimsh.o initjimsh.o
62 $(JIMSH_CC) @SH_LINKFLAGS@ $(LDFLAGS) -o $@ jimsh.o initjimsh.o $(LIBJIM) $(LDLIBS)
64 @if JIM_INSTALL
65 install: all docs @TCL_EXTS@ install-exec
66 mkdir -p $(DESTDIR)$(prefix)/lib/jim
67 cp $(LIBJIM) $(DESTDIR)$(prefix)/lib
68 cp @srcdir@/README.extensions @C_EXT_SHOBJS@ @TCL_EXTS@ $(DESTDIR)$(prefix)/lib/jim
69 mkdir -p $(DESTDIR)$(prefix)/include
70 cp @srcdir@/jim.h @srcdir@/jim-eventloop.h @srcdir@/jim-nvp.h @srcdir@/jim-signal.h \
71 @srcdir@/jim-subcmd.h @srcdir@/jim-win32compat.h $(DESTDIR)$(prefix)/include
72 cp jim-config.h $(DESTDIR)$(prefix)/include
73 mkdir -p $(DESTDIR)$(prefix)/doc/jim
74 cp Tcl.html $(DESTDIR)$(prefix)/doc/jim
76 install-exec: all
77 mkdir -p $(DESTDIR)$(prefix)/bin
78 cp $(JIMSH) $(DESTDIR)$(prefix)/bin
80 uninstall:
81 rm -f $(DESTDIR)$(prefix)/bin/$(JIMSH)
82 rm -f $(DESTDIR)$(prefix)/lib/$(LIBJIM)
83 for i in README.extensions @C_EXT_SHOBJS@ @TCL_EXTS@; do rm -f $(DESTDIR)$(prefix)/lib/jim/$$i; done
84 rm -f $(DESTDIR)$(prefix)/include/jim*.h
85 rm -f $(DESTDIR)$(prefix)/doc/jim/Tcl.html
86 @else
87 install install-exec uninstall:
88 @endif
90 test: $(JIMSH)
91 $(DEF_LD_PATH) $(MAKE) -C @srcdir@/tests jimsh=`pwd`/jimsh
93 $(OBJS): Makefile
95 @if JIM_UTF8
96 # Generate the unicode case mapping
97 utf8.o: _unicode_mapping.c
99 _unicode_mapping.c: @srcdir@/UnicodeData.txt @srcdir@/parse-unidata.tcl
100 @tclsh@ @srcdir@/parse-unidata.tcl @srcdir@/UnicodeData.txt >$@ || ( rm $@; exit 1)
101 @endif
103 _load-static-exts.c: @srcdir@/make-load-static-exts.tcl Makefile
104 @tclsh@ @srcdir@/make-load-static-exts.tcl @STATIC_EXTS@ >$@ || ( rm $@; exit 1)
106 @if JIM_STATICLIB
107 $(LIBJIM): $(OBJS)
108 $(AR) cr $@ $(OBJS)
109 $(RANLIB) $@
110 @else
111 $(LIBJIM): $(OBJS)
112 $(CC) $(CFLAGS) $(LDFLAGS) $(SH_LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
113 @endif
115 # Note that $> $^ is for compatibility with both GNU make and BSD make
116 readdir.so: jim-readdir.c
117 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-readdir.o $> $^
118 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-readdir.o $(SH_LIBJIM)
120 array.so: jim-array.c
121 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-array.o $> $^
122 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-array.o $(SH_LIBJIM)
124 clock.so: jim-clock.c
125 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-clock.o $> $^
126 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-clock.o $(SH_LIBJIM)
128 file.so: jim-file.c
129 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-file.o $> $^
130 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-file.o $(SH_LIBJIM)
132 posix.so: jim-posix.c
133 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-posix.o $> $^
134 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-posix.o $(SH_LIBJIM)
136 regexp.so: jim-regexp.c
137 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-regexp.o $> $^
138 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-regexp.o $(SH_LIBJIM)
140 syslog.so: jim-syslog.c
141 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-syslog.o $> $^
142 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-syslog.o $(SH_LIBJIM)
144 readline.so: jim-readline.c
145 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-readline.o $> $^
146 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-readline.o $(SH_LIBJIM) @LDLIBS_readline@
148 pack.so: jim-pack.c
149 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-pack.o $> $^
150 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-pack.o $(SH_LIBJIM) @LDLIBS_pack@
152 sqlite.so: jim-sqlite.c
153 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-sqlite.o $> $^
154 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-sqlite.o $(SH_LIBJIM) @LDLIBS_sqlite@
156 sqlite3.so: jim-sqlite3.c
157 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-sqlite3.o $> $^
158 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-sqlite3.o $(SH_LIBJIM) @LDLIBS_sqlite3@
160 win32.so: jim-win32.c
161 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-win32.o $> $^
162 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-win32.o $(SH_LIBJIM) @LDLIBS_win32@
164 mk.so: jim-mk.cpp
165 $(CXX) $(CXXFLAGS) $(SHOBJ_CFLAGS) -c -o jim-mk.o $> $^
166 $(CXX) $(CXXFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-mk.o $(SH_LIBJIM) @LDLIBS_mk@
168 sdl.so: jim-sdl.c
169 $(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-sdl.o $> $^
170 $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-sdl.o $(SH_LIBJIM) @LDLIBS_sdl@
172 Tcl.html: jim_tcl.txt
173 @tclsh@ @srcdir@/make-index $> $^ | asciidoc -o $@ -d manpage - || cp @srcdir@/Tcl_shipped.html Tcl.html
175 clean:
176 rm -f *.o *.so lib*.a $(JIMSH) Tcl.html _*.c
178 distclean: clean
179 rm -f jimautoconf.h jim-config.h Makefile config.log autosetup/jimsh0.c autosetup/jimsh0@EXEEXT@
181 ship: Tcl.html
182 cp $< Tcl_shipped.html
184 # automake compatibility. do nothing for all these targets
185 EMPTY_AUTOMAKE_TARGETS := dvi pdf ps info html tags ctags mostlyclean maintainer-clean check installcheck installdirs \
186 install-pdf install-ps install-info install-html -install-dvi uninstall install-data
187 .PHONY: $(EMPTY_AUTOMAKE_TARGETS)
188 $(EMPTY_AUTOMAKE_TARGETS):
190 # automake compatibility - install sources from the current dir to $(distdir)
191 distdir_full := $(shell cd $(distdir); pwd)
192 distdir:
193 cd "@srcdir@"; git ls-files | cpio -pdmu $(distdir_full)
195 reconfig:
196 CC='@CC@' @AUTOREMAKE@
198 lib: $(LIBJIM)