@@ -66,11 +66,11 @@ # 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 +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@ @@ -167,19 +167,20 @@ 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) +all: @TARGETS@ 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) +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 @@ -186,11 +187,11 @@ @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) +install-binaries: libctk.a @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \ do \ if [ ! -d $$i ] ; then \ echo "Making directory $$i"; \ mkdir $$i; \ @@ -199,12 +200,10 @@ 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 \ @@ -265,15 +264,16 @@ 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 + rm -f Makefile config.status config.log depend: makedepend -- $(CC_SWITCHES) -- $(SRCS) .c.o: