Check-in [e327ead7cb]
Overview
Comment:Updated to produce libctk.so
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e327ead7cbcd4b242b82b8d4fb35e06e74fe9cea
User & Date: rkeene on 2011-09-09 13:45:00.000
Other Links: manifest | tags
Context
2011-09-09
14:09
Updated to use simpler and more portable build system check-in: a68d12f98b user: rkeene tags: trunk
13:45
Updated to produce libctk.so check-in: e327ead7cb user: rkeene tags: trunk
13:30
Added ctk project check-in: 6f5109a8b4 user: rkeene tags: trunk
Changes
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# appropriate version of Tcl for this version of CTk, curses,
# and the math library (in that order).  It is (hopefully) filled
# in properly by the configure script.
LIBS = @LIBS@

# To change the compiler switches, for example to change from -O
# to -g, change the following line:
CFLAGS = -O

# Linker options (-L/.../lib) necessary to find the TCL
# and curses libraries (if any).  It is (hopefully) filled in
# properly by the configure script.
LDFLAGS =		@LDFLAGS@

# Preprocessor options (-I/.../include) necessary to find the TCL







|







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# appropriate version of Tcl for this version of CTk, curses,
# and the math library (in that order).  It is (hopefully) filled
# in properly by the configure script.
LIBS = @LIBS@

# To change the compiler switches, for example to change from -O
# to -g, change the following line:
CFLAGS = @CFLAGS@

# Linker options (-L/.../lib) necessary to find the TCL
# and curses libraries (if any).  It is (hopefully) filled in
# properly by the configure script.
LDFLAGS =		@LDFLAGS@

# Preprocessor options (-I/.../include) necessary to find the TCL
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
	tkUtil.c tkWindow.c tkXEvent.c

HDRS = default.h keyCodes.h ks_names.h patchlevel.h tk.h tkInt.h \
	tkPort.h tkText.h

DEMOPROGS = widget

all: libctk.a cwish$(VERSION)

libctk.a: $(OBJS)
	rm -f libctk.a
	ar cr libctk.a $(OBJS)
	$(RANLIB) libctk.a

cwish$(VERSION): tkAppInit.o libctk.a
	$(CC) $(CC_SWITCHES) tkAppInit.o libctk.a $(LDFLAGS) $(LIBS) -o cwish$(VERSION)


configInfo: Makefile
	@rm -f configInfo
	@echo "# Definitions and libraries needed to build Tk applications" >> configInfo
	@echo "# (generated by the configure script):" >> configInfo
	@echo "TK_CC_SWITCHES = ${AC_FLAGS} ${MEM_DEBUG_FLAGS}" >> configInfo
	@echo "TK_LIBS = @LIBS@" >> configInfo

install: install-binaries install-libraries install-demos install-man

install-binaries: libctk.a cwish$(VERSION)
	@for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	    done;
	@echo "Installing libctk.a"
	@$(INSTALL_DATA) libctk.a $(LIB_INSTALL_DIR)
	@$(RANLIB) $(LIB_INSTALL_DIR)/libctk.a
	@echo "Installing cwish$(VERSION)"
	@$(INSTALL_PROGRAM) cwish$(VERSION) $(BIN_INSTALL_DIR)

install-libraries:
	@for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
		$(SCRIPT_INSTALL_DIR) ; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \







|






|
|
>










|












<
<







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
	tkUtil.c tkWindow.c tkXEvent.c

HDRS = default.h keyCodes.h ks_names.h patchlevel.h tk.h tkInt.h \
	tkPort.h tkText.h

DEMOPROGS = widget

all: @TARGETS@

libctk.a: $(OBJS)
	rm -f libctk.a
	ar cr libctk.a $(OBJS)
	$(RANLIB) libctk.a

libctk.so: $(OBJS)
	rm -f libctk.so
	gcc -rdynamic -shared $(CFLAGS) $(LDFLAGS) -o libctk.so $(OBJS) $(LIBS)

configInfo: Makefile
	@rm -f configInfo
	@echo "# Definitions and libraries needed to build Tk applications" >> configInfo
	@echo "# (generated by the configure script):" >> configInfo
	@echo "TK_CC_SWITCHES = ${AC_FLAGS} ${MEM_DEBUG_FLAGS}" >> configInfo
	@echo "TK_LIBS = @LIBS@" >> configInfo

install: install-binaries install-libraries install-demos install-man

install-binaries: libctk.a
	@for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	    done;
	@echo "Installing libctk.a"
	@$(INSTALL_DATA) libctk.a $(LIB_INSTALL_DIR)
	@$(RANLIB) $(LIB_INSTALL_DIR)/libctk.a



install-libraries:
	@for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
		$(SCRIPT_INSTALL_DIR) ; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
263
264
265
266
267
268
269

270
271
272
273
274
275
276
277
278
279
280
281
	    $(INSTALL_DATA) $$i $(MAN1_INSTALL_DIR); \
	    done;

Makefile: $(SRC_DIR)/Makefile.in
	$(SHELL) config.status

clean:

	rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tktest cwish$(VERSION) \
		config.info

distclean: clean
	rm -f Makefile config.status

depend:
	makedepend -- $(CC_SWITCHES) -- $(SRCS)

.c.o:
	$(CC) -c $(CC_SWITCHES) $<








>




|







262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
	    $(INSTALL_DATA) $$i $(MAN1_INSTALL_DIR); \
	    done;

Makefile: $(SRC_DIR)/Makefile.in
	$(SHELL) config.status

clean:
	rm -f libctk.a libctk.so
	rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tktest cwish$(VERSION) \
		config.info

distclean: clean
	rm -f Makefile config.status config.log

depend:
	makedepend -- $(CC_SWITCHES) -- $(SRCS)

.c.o:
	$(CC) -c $(CC_SWITCHES) $<

Deleted config.log version [242d0fd3a2].
Deleted configure version [3b129ddf7f].
279
280
281
282
283
284
285

286
287
288
289




290
291
fi

#--------------------------------------------------------------------
#	Locate the Tcl header files and the Tcl library
#	archive.
#--------------------------------------------------------------------


AC_CHECK_LIB(tcl, Tcl_Init, [LIBS="-ltcl8.0 $LIBS"; got_it=yes],
    [AC_MSG_WARN(couldn't find tcl8.0 library archive)] )
AC_TRY_CPP([#include "tcl.h"], ,
    [AC_MSG_WARN(couldn't find tcl include file)] )





AC_OUTPUT(Makefile)







>
|



>
>
>
>


279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
fi

#--------------------------------------------------------------------
#	Locate the Tcl header files and the Tcl library
#	archive.
#--------------------------------------------------------------------

AC_DEFINE(USE_TCL_STUBS, [1])
AC_CHECK_LIB(tclstub8.5, Tcl_InitStubs, [LIBS="-ltclstub8.5 $LIBS"; got_it=yes],
    [AC_MSG_WARN(couldn't find tcl8.0 library archive)] )
AC_TRY_CPP([#include "tcl.h"], ,
    [AC_MSG_WARN(couldn't find tcl include file)] )

TARGETS='libctk.so'
CFLAGS="${CFLAGS} -fPIC -DPIC"
AC_SUBST(TARGETS)

AC_OUTPUT(Makefile)