File: Makefile.in

package info (click to toggle)
libtclobjc 1.3-0
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 316 kB
  • ctags: 77
  • sloc: objc: 2,108; makefile: 237; ansic: 186; sh: 174; tcl: 13
file content (242 lines) | stat: -rw-r--r-- 6,196 bytes parent folder | download
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
#
#  Main makefile for Tcl/Objective-C interface library
#  Copyright (C) 1993,1994 R. Andrew McCallum
#
#  Written by:	R. Andrew McCallum <mccallum@cs.rochester.edu>
#  Dept. of Computer Science, U. of Rochester, Rochester, NY  14627
#
#  This file is part of the Tcl/Objective-C interface library.
#
#  This library is free software; you can redistribute it and/or
#  modify it under the terms of the GNU Library General Public
#  License as published by the Free Software Foundation; either
#  version 2 of the License, or (at your option) any later version.
#
#  This library is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
#  Library General Public License for more details.
#
#  You should have received a copy of the GNU Library General Public
#  License along with this library; if not, write to the Free
#  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


SHELL = /bin/sh

#### Start of system configuration section. ####

srcdir = @srcdir@
VPATH = @srcdir@

CC = @CC@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = ar
ARFLAGS = rc
MAKEINFO = makeinfo

# directories in which to find the required include files
TCL_INCLUDE_FLAGS = @TCLINCLUDES@
TK_INCLUDE_FLAGS= @TKINCLUDES@
X_INCLUDE_FLAGS = @XINCLUDES@
READLINE_INCLUDE_FLAGS = @READLINEINCLUDES@

TCL_LIBRARY_FLAGS = @TCLLIBS@
TK_LIBRARY_FLAGS = @TKLIBS@
X_LIBRARY_FLAGS = @XLIBSW@
READLINE_LIBRARY_FLAGS = @READLINELIBS@

TCLLIBS = $(TCL_LIBRARY_FLAGS) \
	$(READLINE_LIBRARY_FLAGS) -lobjc -lm @LIBS@
LIBS = $(TK_LIBRARY_FLAGS) $(TCL_LIBRARY_FLAGS) \
	$(X_LIBRARY_FLAGS) $(READLINE_LIBRARY_FLAGS) -lobjc -lm @LIBS@

DEFS = @DEFS@

# All these are optional.  You can redefine CFLAGS, CPPFLAGS and
# INCLUDEFLAGS on the command line however you like.
CFLAGS = -Wall -Wno-implicit -g -O
CPPFLAGS =
INCLUDEFLAGS =

prefix = @prefix@
exec_prefix = $(prefix)

# Installation locations
libdir = $(exec_prefix)/lib
includedir = $(prefix)/include
infodir = $(prefix)/info

#### End of system configuration section. ####

TCLOBJC_VERSION = 1.3

ALL_INCLUDE_FLAGS = -I. -I$(srcdir) $(INCLUDEFLAGS) \
	$(TCL_INCLUDE_FLAGS) $(TK_INCLUDE_FLAGS) \
        $(X_INCLUDE_FLAGS) $(READLINE_INCLUDE_FLAGS)
ALL_CPPFLAGS = $(ALL_INCLUDE_FLAGS) $(CPPFLAGS)
ALL_CFLAGS = $(CFLAGS)
ALL_OBJCFLAGS = $(CFLAGS) @NON_NeXT_ALL_OBJCFLAGS@

# definitions to be passed to subdir Makefile's
MAKEDEFINES = CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' \
DEFS='$(DEFS)'

.SUFFIXES: .m
.m.o:
	$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_OBJCFLAGS) $<
.c.o:
	$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_CFLAGS) $<

ifeq ($(findstring -DHAVE_OBJC_MALLOC,$(DEFS)),)
OBJC_MALLOC_SRC=objc-malloc.m
OBJC_MALLOC_OBJ=objc-malloc.o
endif

SRCS = \
@NON_NeXT_EXTRA_SRCS@ \
TclInterp.m \
TkInterp.m \
tclObjc.m \
$(OBJC_MALLOC_SRC)

OBJS = \
@NON_NeXT_EXTRA_OBJS@ \
TclInterp.o \
@TkInterp_o@ \
tclObjc.o \
$(OBJC_MALLOC_OBJ)

HDRS = \
TclInterp.h \
@TkInterp_h@

DISTFILES = \
List.m \
HashTable.m \
TclInterp.m \
TkInterp.m \
tclObjc.m \
objc-malloc.m \
xmalloc.c \
checkTcl.m \
checkTk.m \
coll/List.h \
coll/HashTable.h \
TclInterp.h \
TkInterp.h \
tclObjc.h.in \
objc-malloc.h \
objc-gnu2next.h \
check.tcl check.tk \
config.tcllib \
COPYING.LIB ChangeLog \
Makefile.in configure configure.in mkinstalldirs \
gcc.patch \
version.texi \
README readme.texi \
INSTALL install.texi \
NEWS news.texi \
TODO

all: libtclobjc.a libtclobjc.so

libtclobjc.a: $(OBJS)
	$(AR) $(ARFLAGS) libtclobjc.a $(OBJS)
	$(RANLIB) libtclobjc.a

libtclobjc.so: $(OBJS_PIC)
	gcc -shared -Wl,-soname,libtclobjc.so.$(TCLOBJC_VERSION) \
	  -o libtclobjc.so.1.3 $(OBJS_PIC)

install: installdirs all
	$(INSTALL_DATA) libtclobjc.a $(libdir)/libtclobjc.a
	$(RANLIB) $(libdir)/libtclobjc.a
	cd $(srcdir) &&	$(INSTALL_DATA) $(HDRS) $(includedir)
	$(INSTALL_DATA) tclObjc.h $(includedir)

installdirs:
	$(srcdir)/mkinstalldirs $(includedir) $(libdir)

uninstall:
	rm -f $(libdir)/libtclobjc.a
	for file in $(HDRS) tclObjc.h; do \
	  rm -rf $(includedir)/$$file ; \
	done

check: doCheckTcl @doCheckTk@

doCheckTcl: checkTcl
	./checkTcl < $(srcdir)/check.tcl

# Without readline, redirecting into Tk's promptAndEval isn't working
# I haven't looked into why.
doCheckTk: checkTk
	./checkTk $(srcdir)/check.tk

checkTcl: checkTcl.o libtclobjc.a @READLINE_O_EXTRAS@
	$(CC) -g -o checkTcl checkTcl.o libtclobjc.a @READLINE_O_EXTRAS@ $(TCLLIBS)

checkTk: checkTk.o libtclobjc.a @READLINE_O_EXTRAS@
	$(CC) -o checkTk checkTk.o libtclobjc.a @READLINE_O_EXTRAS@ $(LIBS)

depend:
	rm -f $(srcdir)/Makefile.depend
	$(CC) $(ALL_INCLUDE_FLAGS) -M $(SRCS) > $(srcdir)/Makefile.depend

tclObjc.h: Makefile.in tclObjc.h.in
	sed -e \
	's/#define TCLOBJC_VERSION .*/#define TCLOBJC_VERSION "$(TCLOBJC_VERSION)"/'\
		< $(srcdir)/tclObjc.h.in > tclObjc.h

tclObjc.o TclInterp.o: tclObjc.h

version.texi: Makefile
	rm -f $(srcdir)/version.texi
	echo '@set TCLOBJC_VERSION' $(TCLOBJC_VERSION) > $(srcdir)/version.texi
README: readme.texi version.texi news.texi
	$(MAKEINFO) -o README -D README_ONLY \
	--no-header --no-split $(srcdir)/readme.texi
INSTALL: install.texi version.texi
	$(MAKEINFO) -o INSTALL -D INSTALL_ONLY \
	--no-header --no-split $(srcdir)/install.texi
NEWS: news.texi version.texi
	$(MAKEINFO) -o NEWS -D NEWS_ONLY \
	--no-header --no-split $(srcdir)/news.texi

Makefile: Makefile.in config.status
	$(SHELL) config.status
config.status: configure
	$(SHELL) $(srcdir)/configure --no-create
configure: configure.in
	cd $(srcdir); autoconf

TAGS: $(SRCS)
	etags $(SRCS)

mostlyclean:
	rm -f *~ coll/*~ core

clean: mostlyclean
	rm -f libtclobjc.* *.o Makefile.depend checkTk checkTcl

realclean: clean
	rm -f Makefile config.status config.cache config.log

superclean: realclean
	rm -f TAGS configure

dist: $(DISTFILES)
	echo libtclobjc-$(TCLOBJC_VERSION) > .fname
	rm -rf `cat .fname`
	mkdir `cat .fname`
	mkdir `cat .fname`/coll
	for file in $(DISTFILES); do \
	  ln $$file `cat .fname`/$$file ; \
	done
	tar -chvf `cat .fname`.tar `cat .fname`
	gzip `cat .fname`.tar
	rm -rf `cat .fname` .fname