1 # This file is CYGNUS LOCAL. It is a copy of makefile.vc modified for
2 # GNU make. Only the support for tcl 7.6 is finished.
5 exec_prefix = @exec_prefix@
6 VPATH = @srcdir@:@srcdir@/../generic
20 # Visual C++ 4.x makefile for Tix.
22 # Copyright (c) 1996, Expert Interface Technologies
24 # See the file "license.terms" for information on usage and redistribution
25 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
28 #----------------------------------------------------------------------
31 # You can set the following variables in your DOS environment. This
32 # way you don't need to change this file. E.g.:
35 # nmake -f makefile.vc
37 # You can also set these variables in the command line to nmake. E.g.:
39 # nmake TCL_VER=7.5 -f makefile.vc
41 # TOOLS32 = location of VC++ 32-bit development tools.
42 # TIX_DEBUG = Compile Tix with debug information.
43 # TCL_VER = version of Tcl to compile with. Should be either 7.5
45 #----------------------------------------------------------------------
70 TIXLIB = $(TMPDIR)/tix4175.lib
71 TIXLIBNAME = tix4175.lib
72 TIXDLL = $(TMPDIR)/tix4175.dll
73 TIXDLLNAME = tix4175.dll
74 TIXWISH = $(TMPDIR)/tix4175.exe
75 TIXWISHNAME = tix4175.exe
77 CONSOLE_OBJ = tkConsole41.$(OBJEXT)
85 TCLSRCDIR = $(srcdir)/../../tcl
87 TKSRCDIR = $(srcdir)/../../tk
92 TIXLIB = $(TMPDIR)/libtix4176.a
93 TIXLIBNAME = libtix4176.a
94 TIXDLL = $(TMPDIR)/tix4176.dll
95 TIXDLLNAME = tix4176.dll
96 TIXWISH = $(TMPDIR)/tix4176.exe
97 TIXWISHNAME = tix4176.exe
99 CONSOLE_OBJ = tkConsole42.$(OBJEXT)
103 ifeq ($(TCL_VER),8.0a1)
106 TCLDIR = ../../tcl8.0a1
107 TKDIR = ../../tk8.0a1
112 TIXLIB = $(TMPDIR)/tix4180.lib
113 TIXLIBNAME = tix4180.lib
114 TIXDLL = $(TMPDIR)/tix4180.dll
115 TIXDLLNAME = tix4180.dll
116 TIXWISH = $(TMPDIR)/tix4180.exe
117 TIXWISHNAME = tix4180.exe
119 CONSOLE_OBJ = tkConsole80a1.$(OBJEXT)
123 ifeq ($(TCL_VER),8.0b1)
126 TCLDIR = ../../tcl8.0b1
127 TKDIR = ../../tk8.0b1
132 TIXLIB = $(TMPDIR)/tix4180.lib
133 TIXLIBNAME = tix4180.lib
134 TIXDLL = $(TMPDIR)/tix4180.dll
135 TIXDLLNAME = tix4180.dll
136 TIXWISH = $(TMPDIR)/tix4180.exe
137 TIXWISHNAME = tix4180.exe
139 CONSOLE_OBJ = tkConsole80b1.$(OBJEXT)
143 ifeq ($(TCL_VER),8.0)
147 TCLSRCDIR = $(srcdir)/../../tcl
149 TKSRCDIR = $(srcdir)/../../tk
154 TCLDLL = cygtcl80.dll
162 TIXRAWLIBNAME = $(TMPDIR)/tix4180.lib
163 TIXLIB = $(TMPDIR)/libtix4180.a
164 TIXLIBNAME = libtix4180.a
165 TIXDLL = $(TMPDIR)/tix4180.dll
166 TIXDLLNAME = tix4180.dll
167 TIXWISH = $(TMPDIR)/tix4180.exe
168 TIXWISHNAME = tix4180.exe
170 CONSOLE_OBJ = tkConsole80b1.$(OBJEXT)
174 ifeq ($(TCL_VER),8.1)
177 TCLDIR = ../../tcl8.1
178 TCLSRCDIR = $(srcdir)/../../tcl8.1
180 TKSRCDIR = $(srcdir)/../../tk8.1
185 TCLDLL = cygtcl81.dll
193 TIXRAWLIBNAME = $(TMPDIR)/tix4181.lib
194 TIXLIB = $(TMPDIR)/libtix4181.a
195 TIXLIBNAME = libtix4181.a
196 TIXDLL = $(TMPDIR)/tix4181.dll
197 TIXDLLNAME = tix4181.dll
198 TIXWISH = $(TMPDIR)/tix4181.exe
199 TIXWISHNAME = tix4181.exe
201 CONSOLE_OBJ = tkConsole81.$(OBJEXT)
206 ifeq ($(TCL_VER),2.2i)
209 ITCL_DIR = ../../itcl2.2
210 TCLDIR = $(ITCL_DIR)/tcl7.6
211 TKDIR = $(ITCL_DIR)/tk4.2
216 TIXLIB = $(TMPDIR)/tix41761.lib
217 TIXLIBNAME = tix41761.lib
218 TIXDLL = $(TMPDIR)/tix41761.dll
219 TIXDLLNAME = tix41761.dll
220 TIXWISH = $(TMPDIR)/tix41761.exe
221 TIXWISHNAME = tix41761.exe
223 CONSOLE_OBJ = tkConsole42.$(OBJEXT)
225 ITCL_LIBS = $(ITCL_DIR)\itcl\win\itcl22.lib $(ITCL_DIR)\itk\win\itk22.lib
226 ITCL_CFLAGS = -DITCL_2 -I$(ITCL_DIR)\itcl\generic -I$(ITCL_DIR)\itk\generic
231 #!ERROR "Unsupported Tcl version $(TCL_VER)"
238 # Project directories
240 # ROOT = top of source tree
241 # TMPDIR = location where .o files should be stored during build
242 # TCLDIR = location of top of Tcl source heirarchy
247 # uncomment the following two lines to compile with TCL_MEM_DEBUG
248 #DEBUGDEFINES =-DTCL_MEM_DEBUG
250 # Make sure the VC++ tools are at the head of the path
251 #PATH=$(TOOLS32)\bin;$(PATH)
253 TCLLIBDIR = $(TCLDIR)/win
254 TKLIBDIR = $(TKDIR)/win
256 GENERICDIR = $(ROOT)/generic
257 XLIBDIR = $(ROOT)/xlib
259 cc32 = $(TOOLS32)\bin\cl -I$(TOOLS32)\include
260 rc32 = $(TOOLS32)\bin\rc
261 link32 = $(TOOLS32)\bin\link
263 #----------------------------------------------------------------------
264 # You shouldn't normally modify anything below this line
265 #----------------------------------------------------------------------
267 X_TK_INCLUDES = -I$(srcdir) -I$(srcdir)/../generic \
268 -I$(TKSRCDIR)/generic -I$(TKSRCDIR)/win -I$(TKSRCDIR)/xlib \
269 -I$(TCLSRCDIR)/generic
271 TK_INCLUDES = -D_Windows $(X_TK_INCLUDES)
274 -nologo $(DEBUGDEFINES)
277 $(TMPDIR)/tixWinMain.$(OBJEXT)
280 $(TMPDIR)/$(CONSOLE_OBJ) \
281 $(TMPDIR)/tixClass.$(OBJEXT) \
282 $(TMPDIR)/tixCmds.$(OBJEXT) \
283 $(TMPDIR)/tixCompat.$(OBJEXT) \
284 $(TMPDIR)/tixDiImg.$(OBJEXT) \
285 $(TMPDIR)/tixDiITxt.$(OBJEXT) \
286 $(TMPDIR)/tixDiStyle.$(OBJEXT) \
287 $(TMPDIR)/tixDItem.$(OBJEXT) \
288 $(TMPDIR)/tixDiText.$(OBJEXT) \
289 $(TMPDIR)/tixDiWin.$(OBJEXT) \
290 $(TMPDIR)/tixError.$(OBJEXT) \
291 $(TMPDIR)/tixForm.$(OBJEXT) \
292 $(TMPDIR)/tixFormMisc.$(OBJEXT) \
293 $(TMPDIR)/tixGeometry.$(OBJEXT) \
294 $(TMPDIR)/tixHLCol.$(OBJEXT) \
295 $(TMPDIR)/tixHLHdr.$(OBJEXT) \
296 $(TMPDIR)/tixHLInd.$(OBJEXT) \
297 $(TMPDIR)/tixImgCmp.$(OBJEXT) \
298 $(TMPDIR)/tixHList.$(OBJEXT) \
299 $(TMPDIR)/tixList.$(OBJEXT) \
300 $(TMPDIR)/tixMethod.$(OBJEXT) \
301 $(TMPDIR)/tixOption.$(OBJEXT) \
302 $(TMPDIR)/tixSmpLs.$(OBJEXT) \
303 $(TMPDIR)/tixWidget.$(OBJEXT) \
304 $(TMPDIR)/tixInit.$(OBJEXT) \
305 $(TMPDIR)/tixItcl.$(OBJEXT) \
306 $(TMPDIR)/tixUtils.$(OBJEXT) \
307 $(TMPDIR)/tixImgXpm.$(OBJEXT) \
308 $(TMPDIR)/tixNBFrame.$(OBJEXT) \
309 $(TMPDIR)/tixTList.$(OBJEXT) \
310 $(TMPDIR)/tixGrid.$(OBJEXT) \
311 $(TMPDIR)/tixGrData.$(OBJEXT) \
312 $(TMPDIR)/tixGrRC.$(OBJEXT) \
313 $(TMPDIR)/tixGrFmt.$(OBJEXT) \
314 $(TMPDIR)/tixGrSel.$(OBJEXT) \
315 $(TMPDIR)/tixGrUtl.$(OBJEXT) \
316 $(TMPDIR)/tixScroll.$(OBJEXT) \
317 $(TMPDIR)/tixWCmpt.$(OBJEXT) \
318 $(TMPDIR)/tixWinDraw.$(OBJEXT) \
319 $(TMPDIR)/tixWinXpm.$(OBJEXT) \
320 $(TMPDIR)/tixWinWm.$(OBJEXT)
324 #!include <ntwin32.mak>
326 all: $(TIXDLL) $(TIXWISH)
328 $(TMPDIR)/tixcyg.def: $(TIXOBJS)
329 echo 'EXPORTS' > tmp.def
330 for o in $(TIXOBJS); do \
331 $(NM) --extern-only --defined-only $$o | sed -e 's/[^ ]* [^ ]* //' -e 's/^_//' | fgrep -v DllEntryPoint | fgrep -v DllMain | fgrep -v impure_ptr | fgrep -v _real@ >> tmp.def; \
333 mv tmp.def $(TMPDIR)/tixcyg.def
335 # USE THESE IF YOU DO NOT WANT TO LINK TO ON MSVCRT.DLL
336 #XGUILIBS = $(guilibs)
339 XGUILIBS = $(guilibsdll)
342 # (ToDo) $(TIXDLL) doesn't have resources to define its icon, etc.
347 $(TIXDLL): $(TIXOBJS) $(TMPDIR)/tixcyg.def
348 $(CC) -s -nostartfiles -Wl,--base-file,tix.base -Wl,--dll -o $(TIXDLLNAME) $(TIXOBJS) $(TKLIBDIR)/$(TKLIB) $(TCLLIBDIR)/$(TCLLIB) -lcygwin -ladvapi32 -luser32 -lgdi32 -lcomdlg32 -lkernel32 -Wl,--subsystem,windows -Wl,-e,_DllMain@12 -Wl,--image-base,0x66600000
349 $(DLLTOOL) --as=$(AS) --dllname $(TIXDLLNAME) --def $(TMPDIR)/tixcyg.def --base-file tix.base --output-exp tix.exp
350 $(CC) -s -nostartfiles -Wl,--base-file,tix.base -Wl,tix.exp -Wl,-dll -o $(TIXDLLNAME) $(TIXOBJS) $(TKLIBDIR)/$(TKLIB) $(TCLLIBDIR)/$(TCLLIB) -lcygwin -ladvapi32 -luser32 -lgdi32 -lcomdlg32 -lkernel32 -Wl,--subsystem,windows -Wl,-e,_DllMain@12 -Wl,--image-base,0x66600000
351 $(DLLTOOL) --as=$(AS) --dllname $(TIXDLLNAME) --def $(TMPDIR)/tixcyg.def --base-file tix.base --output-exp tix.exp
352 $(CC) -nostartfiles -Wl,tix.exp -Wl,--dll -o $(TIXDLLNAME) $(TIXOBJS) $(TKLIBDIR)/$(TKLIB) $(TCLLIBDIR)/$(TCLLIB) -lcygwin -ladvapi32 -luser32 -lgdi32 -lcomdlg32 -lkernel32 -Wl,--subsystem,windows -Wl,-e,_DllMain@12 -Wl,--image-base,0x66600000
353 cp $(TIXDLLNAME) $(TIXDLL)
355 $(TIXLIB): $(TMPDIR)/tixcyg.def
356 $(DLLTOOL) --as=$(AS) --dllname $(TIXDLLNAME) --def $(TMPDIR)/tixcyg.def --output-lib $(TIXLIB)
358 $(TIXWISH): $(WISHOBJS) $(TIXOBJS) $(TIXLIB) $(TMPDIR)/tixwishres.$(OBJEXT)
359 $(CC) -mwindows $(WISHOBJS) $(TMPDIR)/tixwishres.$(OBJEXT) $(TIXLIB) \
360 $(TKLIBDIR)/$(TKLIB) $(TCLLIBDIR)/$(TCLLIB) \
364 $(TIXDLL): $(TIXOBJS) $(TMPDIR)/tixcyg.def
365 link -debug -dll -out:$(TIXDLL) $(TKLIBDIR)/$(TKLIB) \
366 $(TCLLIBDIR)/$(TCLLIB) $(TIXOBJS) -def:$(TMPDIR)/tixcyg.def \
368 mv $(TIXRAWLIBNAME) $(TIXLIB)
372 $(TIXWISH): $(WISHOBJS) $(TIXOBJS) $(TIXLIB) $(TMPDIR)/tixwishres.$(OBJEXT)
373 link -DEBUG $(WISHOBJS) $(TMPDIR)/tixwishres.$(OBJEXT) $(TIXLIB) \
374 $(TKLIBDIR)/$(TKLIB) $(TCLLIBDIR)/$(TCLLIB) \
375 -OUT:$(TIXWISH) user32.lib
380 # Special case object file targets
383 $(TMPDIR)/testMain.$(OBJEXT): $(ROOT)/win/tixWinMain.c
384 $(CC) -c $(TK_INCLUDES) -DSTATIC_BUILD -DTK_TEST $(CFLAGS) -o $@ $?
386 $(TMPDIR)/tixWinMain.$(OBJEXT): $(ROOT)/win/tixWinMain.c
387 $(CC) -c $(TK_INCLUDES) -DSTATIC_BUILD $(CFLAGS) -o $@ $?
391 $(TMPDIR)/tixwishres.$(OBJEXT): $(ROOT)/win/rc/tixwish.rc
392 $(WINDRES) --include $(srcdir)/rc --include $(srcdir)/../generic --define VS_VERSION_INFO=1 $(srcdir)/rc/tixwish.rc $(TMPDIR)/tixwishres.$(OBJEXT)
396 $(TMPDIR)/tixwishres.$(OBJEXT): $(ROOT)/win/rc/tixwish.rc
397 rc -i$(srcdir)/rc -i$(srcdir)/../generic -dVS_VERSION_INFO=1 -fo$(TMPDIR)/tixwishres.$(OBJEXT) $(srcdir)/rc/tixwish.rc
405 $(CC) -c $(CFLAGS) -DDLL_BUILD -DBUILD_tix $(TK_INCLUDES) -c -o $@ $<
407 $(TMPDIR)/%.$(OBJEXT): %.c
408 $(CC) -c $(CFLAGS) -DDLL_BUILD -DBUILD_tix $(TK_INCLUDES) -c -o $@ $<
411 rm -f $(TMPDIR)/*.$(OBJEXT) $(TMPDIR)/*.exp $(TMPDIR)/*.def
412 rm -f $(TIXLIB) $(TIXDLL) $(TIXDLLNAME) $(TIXWISH)
414 Makefile: $(srcdir)/Makefile.in config.status
415 $(SHELL) config.status
417 config.status: $(srcdir)/configure
418 ./config.status --recheck
420 #----------------------------------------------------------------------
424 #----------------------------------------------------------------------
426 TIX_VERSION = @TIX_VERSION@
428 # Directory in which to install the library of Tix scripts and demos
429 # (note: you can set the TIX_LIBRARY environment variable at run-time to
430 # override the compiled-in location):
431 TIX_LIBRARY = $(prefix)/share/tix$(TIX_VERSION)
433 # CYGNUS LOCAL: dj - change to autoconf'd directories
435 # Directory in which to install the archive libtix.a:
438 # Directory in which to install the program wish:
441 # Directory in which to install the include file tix.h:
442 INCLUDE_DIR = @includedir@
444 # Top-level directory for manual entries:
447 # Directory in which to install manual entry for wish:
448 MAN1_DIR = $(MAN_DIR)/man1
450 # Directory in which to install manual entries for Tix's C library
452 MAN3_DIR = $(MAN_DIR)/man3
454 # Directory in which to install manual entries for the built-in
455 # Tcl commands implemented by Tix:
456 MANN_DIR = $(MAN_DIR)/mann
458 INSTALL = @SRC_DIR@/install.sh -c
459 INSTALL_PROGRAM = @INSTALL_PROGRAM@
460 INSTALL_DATA = @INSTALL_DATA@
462 INC_DIR = @SRC_DIR@/generic
463 UNIX_DIR = @SRC_DIR@/unix
464 LIBRARY_DIR = @SRC_DIR@/library
465 DEMOS_DIR = @SRC_DIR@/demos
467 TOOLS_DIR = @SRC_DIR@/tools
468 MANUAL_DIR = @SRC_DIR@/man
470 install:: install-basic install-binaries
474 @for i in $(LIB_DIR) $(BIN_DIR) ; \
476 if [ ! -d $$i ] ; then \
477 echo "Making directory $$i"; \
483 @echo "Installing $(TIXLIB) as $(LIB_DIR)/$(TIXLIBNAME)"
484 @$(INSTALL_DATA) $(TIXLIB) $(LIB_DIR)/$(TIXLIBNAME)
485 @echo "Installing $(TIXWISH) as $(BIN_DIR)/$(TIXWISHNAME)"
486 @$(INSTALL_PROGRAM) $(TIXWISH) $(BIN_DIR)/$(TIXWISHNAME)
487 @echo "Installing $(TIXDLL) as $(BIN_DIR)/$(TIXDLLNAME)"
488 @$(INSTALL_PROGRAM) $(TIXDLL) $(BIN_DIR)/$(TIXDLLNAME)
493 install-basic:: install-libraries install-headers install-demos \
494 install-man install-tools
497 @for i in $(BIN_DIR) ; \
499 if [ ! -d $$i ] ; then \
500 echo "Making directory $$i"; \
506 @echo "installing the tixindex program for building tclIndex for Tix scripts"
507 @cd $(TOOLS_DIR); $(INSTALL_PROGRAM) tixindex $(BIN_DIR)/tixindex
510 @for i in $(INCLUDE_DIR); \
512 if [ ! -d $$i ] ; then \
513 echo "Making directory $$i"; \
519 @for i in $(INC_DIR)/tix.h; \
521 echo "Installing $$i"; \
522 $(INSTALL_DATA) $$i $(INCLUDE_DIR); \
526 @for i in $(BIN_DIR) $(prefix)/lib $(TIX_LIBRARY) $(TIX_LIBRARY)/bitmaps $(TIX_LIBRARY)/pref; \
528 if [ ! -d $$i ] ; then \
529 echo "Making directory $$i"; \
535 @echo "Installing $(TIXDLL) as $(BIN_DIR)/$(TIXDLLNAME)"
536 @$(INSTALL_PROGRAM) $(TIXDLL) $(BIN_DIR)/$(TIXDLLNAME)
537 @for i in $(LIBRARY_DIR)/*.tcl $(LIBRARY_DIR)/tclIndex; \
539 echo "Installing $$i"; \
540 $(INSTALL_DATA) $$i $(TIX_LIBRARY); \
542 @for i in $(LIBRARY_DIR)/bitmaps/*; \
544 if [ -f $$i ] ; then \
545 echo "Installing $$i"; \
546 $(INSTALL_DATA) $$i $(TIX_LIBRARY)/bitmaps; \
549 @for i in $(LIBRARY_DIR)/pref/*; \
551 if [ -f $$i ] ; then \
552 echo "Installing $$i"; \
553 $(INSTALL_DATA) $$i $(TIX_LIBRARY)/pref; \
556 @echo "Installing pkgIndex.tcl"
557 @$(INSTALL_DATA) $(srcdir)/pkgIndex.tcl $(TIX_LIBRARY)
560 @for i in $(prefix)/lib $(TIX_LIBRARY) $(TIX_LIBRARY)/demos \
561 $(TIX_LIBRARY)/demos/bitmaps $(TIX_LIBRARY)/demos/samples ; \
563 if [ ! -d $$i ] ; then \
564 echo "Making directory $$i"; \
570 @cd $(DEMOS_DIR); for i in *; \
572 if [ -f $$i ] ; then \
573 echo "Installing demos/$$i"; \
574 sed -e '1 s|/usr/local/bin/tixwish|$(BIN_DIR)/tixwish|' \
575 $$i > $(TIX_LIBRARY)/demos/$$i; \
578 @for i in $(DEMO_PROGS); \
580 chmod 755 $(TIX_LIBRARY)/demos/$$i; \
582 @for i in $(DEMOS_DIR)/bitmaps/*; \
584 if [ -f $$i ] ; then \
585 echo "Installing $$i"; \
586 $(INSTALL_DATA) $$i $(TIX_LIBRARY)/demos/bitmaps; \
589 @for i in $(DEMOS_DIR)/samples/*; \
591 if [ -f $$i ] ; then \
592 echo "Installing $$i"; \
593 $(INSTALL_DATA) $$i $(TIX_LIBRARY)/demos/samples; \
598 @for i in $(MAN_DIR) $(MAN1_DIR) $(MAN3_DIR) $(MANN_DIR) ; \
600 if [ ! -d $$i ] ; then \
601 echo "Making directory $$i"; \
607 @cd $(MANUAL_DIR); for i in *.n *.1; \
609 echo "Installing doc/$$i"; \
610 rm -f $(MANN_DIR)/$$i; \
611 sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
612 $$i > $(MANN_DIR)/$$i; \
613 chmod 444 $(MANN_DIR)/$$i; \
616 install-info info installcheck:
618 install-minimal: install-libraries
619 @echo "Installing $(TIXDLL) as $(BIN_DIR)/$(TIXDLLNAME)"
620 @$(INSTALL_PROGRAM) $(TIXDLL) $(BIN_DIR)/$(TIXDLLNAME)